Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.7.0
-
None
-
Windows 7 64bit, QtCreator 4.0.3, Qt 5.0.7 (MSVC 2013, 32bit), MinGW 5.3.0 32bit
Description
This issue occurs if you derive an existing class (e.g. QSettings) which doesn't register their enums via Q_ENUMS or Q_ENUM.
You can make the enum keys visible in QML (autocomplete) if the child class registers them with Q_ENUMS, but it seems that QML can't resolve the related values.
Surprisingly you can get the enum values from Q_INVOKABLE methods, slots and signals if you register the parent enum via Q_DECLARE_METATYPE and qRegisterMetaType (see QTBUG-20639).
For Qt classes the problem could be solved, if QTBUG-28586 gets fixed.
But shouldn't there be a general solution if you can't change the parent class?
Attachments
Issue Links
- relates to
-
QTBUG-58454 Q_ENUMs from one class cannot be used as a Q_INVOKABLE function parameter of another class
- Closed