Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
QDS 4.5.1, QDS 4.6.0
Description
Steps to reproduce
- Create a new Empty project that targets Qt 6.5
- Add the following snippets to the auto-generated files:
// <PROJECT_NAME>/Constants.qml enum MyEnum { Alpha, Bravo, Charlie }
// <PROJECT_NAME>Content/Screen01.ui.qml Item { id: testItem x: Constants.Bravo property int enumConst: Constants.Bravo property int intConst: 10 }
Outcomes
Property View:
- The value of testItem.x == 1 (Expected)
- The value of testItem.intConst == 10 (Expected)
- The value of testItem.enumConst == 0 (Not Expected)
- testItem.intConst is treated as a constant (Expected)
- testItem.x and testItem.enumConst are treated as bindings (Not Expected)
Binding Editor:
- testItem.intConst is not shown (Expected)
- testItem.x and testItem.enumConst are shown, with "Constants.Bravo" treated as a source property (Not Expected)
Attachments
Issue Links
- depends on
-
QTBUG-15483 Allow using enums as properties in QML
-
- Open
-