Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.4.1
-
6c4f44773 (dev), facd6c685 (6.6), 797bbb3bc (tqtc/lts-6.5)
Description
The attached example runs into
Warning: main.qml:11:26: Unqualified access property int evtype: EventType.INFO ^^^^^^^^^ Error: main.qml:11:26: Could not compile binding for evtype: Cannot access value for name EventType property int evtype: EventType.INFO ^^^^^^^^^
until you make EventType inherit from QObject and replace Q_GADGET by Q_OBJECT.
From my understanding (and it works for some years in runtime), pure gadgets should be able to keep enums.
Attachments
Issue Links
- is duplicated by
-
QTBUG-114394 Improve documentation on how to register C++ types with enums for QML as value types and namespaces
- Closed
For Gerrit Dashboard: QTBUG-108883 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
445640,2 | qmltyperegistrar: Generate accessSemantics="none" for foreign namespaces | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
510832,10 | Document how to expose value types with enumerations | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
511776,3 | Document how to expose value types with enumerations | 6.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
513696,2 | Document how to expose value types with enumerations | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |