Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
"has a relation" to work with designer ?
Hi all...
if i have the following code fragment :
//
//
class QDESIGNER_WIDGET_EXPORT CTest : public QObject
{
Q_OBJECT
//
Q_PROPERTY( QString TestString READ getTestString WRITE setTestString )
public:
//
CTest()
:QObject()
{
};
~CTest()
{
};
CTest& operator= ( CTest& v)
{
TestString = v.getTestString();
return *this;
};
QString getTestString () { return TestString; };
void setTestString( QString value ) { TestString = value ; };
protected:
//
private:
//
QString TestString;
};
//
class QDESIGNER_WIDGET_EXPORT EQtDataView : public QWidget
{
Q_OBJECT
//
Q_PROPERTY( QString ExportIdOffset READ getExportIdOffset WRITE setExportIdOffset )
//
Q_PROPERTY( QString ClearParamID READ getClearParamID WRITE setClearParamID )
//
Q_PROPERTY( QString DataSource0ID READ getDataSource0ID WRITE setDataSource0ID )
Q_PROPERTY( QString DataSource1ID READ getDataSource1ID WRITE setDataSource1ID )
Q_PROPERTY( QString DataSource2ID READ getDataSource2ID WRITE setDataSource2ID )
Q_PROPERTY( QString DataSource3ID READ getDataSource3ID WRITE setDataSource3ID )
//
Q_PROPERTY( QColor BackgroundColor READ getBackgroundColor WRITE setBackgroundColor )
Q_PROPERTY( QColor GridColor READ getGridColor WRITE setGridColor )
//
Q_ENUMS( ePlotMode )
Q_PROPERTY( ePlotMode PlotMode READ getPlotMode WRITE setPlotMode )
//
Q_PROPERTY( CTest MyTest READ getMyTest WRITE setMyTest )
public:
//
CTest MyTest;
CTest& getMyTest()
{
return MyTest;
};
void setMyTest( CTest& value )
{
MyTest = value;
};
//
would one not expect the properties of CTest to show up in the designer ?
Am i doing something completely wrong here ?
Thanks for any help !
This post has been edited 1 times, last edit by "Thejester" (Dec 4th 2007, 12:42pm)
one other thing :
all other properties do show up...