Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.8.x
-
None
-
Mac 10.7.4 and Windows 7
-
816c5540179362500dfc175b77f05abf3ef25233 8a205983c47a8fc3f145af0c9d5443dd939950de 84787d82ee9369b2a83c5b0568ee62ab602a5528
Description
I have a QSqlTableModel with index 1 of the model mapped to a QComboBox. Data appears correctly in the CB, however when I click on an "Edit" button which displays a QInputDialog with the value from the CB, the data in the model at index 0 changes to the index of the value selected in the CB. I checked the data before the dialog is called and it is correct. The data in the dialog is correct but if I cancel the dialog and display the contents of the model, the data has changed. For instance:
Before call to the QInputDialog
Rig One
Rig Two <-- this is the current index, the one selected from the CB.
Post call
1
Rig Two
If I then select the first index, now value "1" and cancel, it changes to "O".
In another case with another CB, something similar happens except the selected data itself is replaced with its index, like the following:
Rig One
Rig Two <-- this is the current index, the one selected from the CB.
Post call
Rig One
1
Selecting "Rig One" and canceling cause it's value to change to "0". In this case, though, while the dialog is displayed I can see in the CB that its value has already changed even though the data displayed in the Dialog is correct.
In two other areas where I use CBs in the exact manner, everything works perfectly.
In addition, in Qt 4.7.4 all the code works perfect – no issues whatsoever (verified)