desch
1st December 2007, 15:02
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:
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;
};
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
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:
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;
};
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