Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.11
-
None
Description
So the following does NOT work as you would expect:
ComboBox { id: race model: ["I choose not to answer","American Indian or Alaska native", "Asian", "Black or African American", "Polynesian","White","Other"] currentIndex: race.find("Asian"); }
as it would actually make the ComboBox blank rather than select the "Asian" option. My current workaround is this:
ComboBox { id: race model: ["I choose not to answer","American Indian or Alaska native", "Asian", "Black or African American", "Polynesian","White","Other"] Component.onCompleted: race.currentIndex = race.find("Asian"); }
Which will properly set the ComboBox to "Asian". I assume this is because the "currentIndex" property is called before the model is actually set. I assume this is more of a bug rather than intended function of ComboBox.
Attachments
Issue Links
- resulted in
-
QTBUG-73742 No documentation stating that property/binding evaluation order is undefined
- Closed