qt5base-lts/tests/auto/sql/models/qsqlrelationaldelegate/qsqlrelationaldelegate.pro
Andy Shaw b92db8a4ad Show the display role inside the editor for the relation in a QComboBox
When a QComboBox is used as the editor for a relation inside a view then
it could end up showing the contents of the EditRole. This would be the
field which is used to represent the entry as opposed to the DisplayRole
which is what the user would expect to see is.

Therefore, setEditorData() is overridden to ensure that it is showing
the right data to the user. When the model gets updated, it will take the
corresponding EditRole value as before to ensure it is updated correctly.

Task-number: QTBUG-59632
Change-Id: Ibbccc3e9477de1cdefb654051b97dd111df36382
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-05-29 22:08:28 +00:00

6 lines
154 B
Prolog

CONFIG += testcase
TARGET = tst_qsqlrelationaldelegate
SOURCES += tst_qsqlrelationaldelegate.cpp
QT = core sql testlib core-private sql-private widgets