Hi Everybody,
I try to set an Enum as property inside Qt Designer using an Enum coming from another aggregate class: this is the code I try to achieve:
{
public:
motherClass();
~motherClass();
enum toto{titi, tata};
toto _myToto;
};
{
Q_OBJECT
Q_ENUMS(motherClass::toto)
Q_PROPERTY( motherClass::toto toto READ toto WRITE settoto)
public:
CLASS2
( QWidget * parent
= 0){ myMotherClass
= new motherClass;
} ~CLASS2();
void settoto ( motherClass::toto);
motherClass::toto toto () const { return myMotherClass->_myToto;}
motherClass* myMotherClass;
};
class motherClass: public QObject
{
public:
motherClass();
~motherClass();
enum toto{titi, tata};
toto _myToto;
};
class CLASS2: public QObject
{
Q_OBJECT
Q_ENUMS(motherClass::toto)
Q_PROPERTY( motherClass::toto toto READ toto WRITE settoto)
public:
CLASS2( QWidget * parent = 0){ myMotherClass = new motherClass;}
~CLASS2();
void settoto ( motherClass::toto);
motherClass::toto toto () const { return myMotherClass->_myToto;}
motherClass* myMotherClass;
};
To copy to clipboard, switch view to plain text mode
I try a lot of things but doesn't succeed to see the "toto" property with choice Enum toto inside Designer
If someone has an idea
Great Thanks
David
Bookmarks