Den 14-11-2013 21:36, Guido Seifert skrev:
Hi,
I have a little problem with my enums in QtQuick 2.
Im a C++ class I created an enum and used Q_ENUMS to make the enums known to
the property system.
I registered my class with qmlRegisterType.
So far so good. Works. I can invoke methods,
Did you remember to import your registered type in your qml code? If you
register something like this,
qmlRegisterTypeMyClass(MyClass,1,0,MyClass);
where you have your enums then in qml you need to import that type on the
top of your code,
import MyClass 1.0
Cheers,
Ola
2013/11/14 Guido
Hi,
No namespaces and no forgotten import.
It is really strange. The class in which I defined the enums is a
QAbstractTableModel,
which I use as model in QML. As I wrote, everything works perfectly, except for
the
enums. So the code cannot be that wrong. In another project I managed to use my
On 15 Nov 2013, at 1:32 PM, Guido Seifert wrote:
Hi,
No namespaces and no forgotten import.
It is really strange. The class in which I defined the enums is a
QAbstractTableModel,
which I use as model in QML. As I wrote, everything works perfectly, except
for the
enums. So the code
It might be related to https://bugreports.qt-project.org/browse/QTBUG-33248
somehow although it doesn't sound like you are using a composite type.
Yes. Looks almost the same. The only difference is that I used
QAbstractTableModel instead of QQuickAbstractMessageDialog.
Guido
Hi,
I have a little problem with my enums in QtQuick 2.
Im a C++ class I created an enum and used Q_ENUMS to make the enums known to
the property system.
I registered my class with qmlRegisterType.
So far so good. Works. I can invoke methods, which I marked with Q_INVOKABLE.
Get signals from