Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.12.0
-
None
Description
In the new 5.12 TableView the delegates of type ComboBox (and all other views) reject QVariant wrapped model values without notice (the QAbstactTableModel::data returns QVariant).
In this case the view behaves as if no model is set.
A workaround is to concat the wrapped list to an empty array.
Is this the expected behavior, or should views warn if they can't convert values passed to them?
Even better would be if the views would accept the QVariant wrapped list values just like JS arrays.
Simplified example:
ComboBox { //or ListView { //fails silently for values of QVariant::fromValue<QStringList> // and QVariant::fromValue<QList<int> > etc. model: myList; } ComboBox { //ugly workaround model: [].concat(myList); }
Attachments
Issue Links
- is required for
-
QTBUG-87797 Implement non-native FileDialog
- Closed
For Gerrit Dashboard: QTBUG-72906 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
346395,6 | ListView: support QList<QUrl> models | 6.1 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
346413,4 | ListView: support QList<QUrl> models | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
370841,1 | ListView: support QList<QUrl> models | tqtc/lts-5.15 | qt/tqtc-qtdeclarative | Status: ABANDONED | +1 | 0 |