Results 1 to 6 of 6

Thread: "has a relation" to work with designer ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default "has a relation" to work with designer ?

    Hi all...

    if i have the following code fragment :

    Qt Code:
    1. //
    2. //
    3. class QDESIGNER_WIDGET_EXPORT CTest : public QObject
    4. {
    5. Q_OBJECT
    6. //
    7. Q_PROPERTY( QString TestString READ getTestString WRITE setTestString )
    8. public:
    9. //
    10. CTest()
    11. {
    12. };
    13. ~CTest()
    14. {
    15. };
    16. CTest& operator= ( CTest& v)
    17. {
    18. TestString = v.getTestString();
    19. return *this;
    20. };
    21. QString getTestString () { return TestString; };
    22. void setTestString( QString value ) { TestString = value ; };
    23. protected:
    24. //
    25. private:
    26. //
    27. QString TestString;
    28. };
    29. //
    30. class QDESIGNER_WIDGET_EXPORT EQtDataView : public QWidget
    31. {
    32. Q_OBJECT
    33. //
    34. Q_PROPERTY( QString ExportIdOffset READ getExportIdOffset WRITE setExportIdOffset )
    35. //
    36. Q_PROPERTY( QString ClearParamID READ getClearParamID WRITE setClearParamID )
    37. //
    38. Q_PROPERTY( QString DataSource0ID READ getDataSource0ID WRITE setDataSource0ID )
    39. Q_PROPERTY( QString DataSource1ID READ getDataSource1ID WRITE setDataSource1ID )
    40. Q_PROPERTY( QString DataSource2ID READ getDataSource2ID WRITE setDataSource2ID )
    41. Q_PROPERTY( QString DataSource3ID READ getDataSource3ID WRITE setDataSource3ID )
    42. //
    43. Q_PROPERTY( QColor BackgroundColor READ getBackgroundColor WRITE setBackgroundColor )
    44. Q_PROPERTY( QColor GridColor READ getGridColor WRITE setGridColor )
    45. //
    46. Q_ENUMS( ePlotMode )
    47. Q_PROPERTY( ePlotMode PlotMode READ getPlotMode WRITE setPlotMode )
    48. //
    49. Q_PROPERTY( CTest MyTest READ getMyTest WRITE setMyTest )
    50. public:
    51. //
    52. CTest MyTest;
    53. CTest& getMyTest()
    54. {
    55. return MyTest;
    56. };
    57. void setMyTest( CTest& value )
    58. {
    59. MyTest = value;
    60. };
    61. //
    To copy to clipboard, switch view to plain text mode 
    Would one not expect the properties of CTest to show up in the designer ?
    Am i doing something completely wrong here ?

    All the other properties of the dataview ARE displayed in the designer.

    Thanks for any help !
    Last edited by jpn; 4th December 2007 at 15:44. Reason: missing [code] tags

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.