View Full Version : Index (position) changed on saving with QTableView
Auryn
21st July 2008, 16:16
I have a QSqlRelationalTableModel with one QTableView of it.
After you change data on a row... visually the table goes to the top, difficulting the entry of sequencial data with tabulations or clicking on another position.
How do you change that data? Do you call select() somewhere?
Auryn
22nd July 2008, 08:15
When using
my_model.setEditStrategy(QSqlTableModel::OnManualS ubmit);
I save with
my_model.submitAll();
When using
my_model.setEditStrategy(QSqlTableModel::OnRowChan ge);
I don't save manually.
After saving, occurs a "reselect" and the table position goes to the beginning.
The position must go to next field when ending an edition with tab key. And when clicking on another position while we are in edit mode must go to that position, not to the beginning.
Thank you
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.