Re: [Interest] C++ enums undefined in QML

2013-11-15 Thread Bo Thorsen
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,

Re: [Interest] C++ enums undefined in QML

2013-11-15 Thread Ola Røer Thorsen
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

Re: [Interest] C++ enums undefined in QML

2013-11-15 Thread Guido Seifert
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

Re: [Interest] C++ enums undefined in QML

2013-11-15 Thread Rutledge Shawn
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

Re: [Interest] C++ enums undefined in QML

2013-11-15 Thread Guido Seifert
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

[Interest] C++ enums undefined in QML

2013-11-14 Thread Guido Seifert
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