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