Results 1 to 4 of 4

Thread: Inherited Properties on Custom Widgets

  1. #1
    Join Date
    Feb 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Inherited Properties on Custom Widgets

    Hello All,

    I have built my own Label Widget derived from QLabel which is now clickable. It is working fine and also shown in QTDesigner and also in QTCreator without Problems. I have used Qt 4.6.2. I also tried to bring it visible inside Eclipse integration but I failed and gave up. But thats another storie.
    When I place my new Label on a Form inside QtDesigner I can see the properties for QObject and QWidget in the Property Editor. Thats fine, but what about the QFrame and the QLabel properties. If I place a normal QLabel on my Form the inherited properties are also shown in the property editor. I gues I have to adopt the domXml Function but I'm not sure.

    Thanks
    Michael

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Inherited Properties on Custom Widgets

    Hmm, I have a feeling that it's not domXml() because for example QxtLineEdit plugin works fine and the domXml() implementation is trivial one liner telling nothing about the base class: http://dev.libqxt.org/libqxt/src/tip...editplugin.cpp. But do you have appropriate Q_OBJECT macros there?
    J-P Nurmi

  3. #3
    Join Date
    Feb 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Inherited Properties on Custom Widgets

    Hello, and thanx for the answer.

    Yes I have also seen that the Qt3 support widgets also showing the properties of their base classes and the domXml is also very simple.
    Yes I think I have all the QT macros used which are also described in the QtAssistent examples.

    The code for the plugin can be downloaded here:

    http://www.isd-web.com/index.php?opt...lder&Itemid=23

    Its the MyLabel.cpp.tar.gz download.

    Thanks
    Michael

  4. #4
    Join Date
    Feb 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Inherited Properties on Custom Widgets

    Hi again,

    I checked the Qxt lib but couldnt find the differences in the QxtLabel. The only difference was that QxtLabel inherits from QFrame.
    I tried this but didn't chnaged anything.
    Any other Ideas?
    Thanks
    Michael

Similar Threads

  1. QT4 custom designer plugin properties ignored
    By Intangir in forum Qt Programming
    Replies: 7
    Last Post: 23rd May 2015, 11:56
  2. QWizard fields and custom properties
    By HelLViS69 in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2010, 16:41
  3. Signals from inherited widgets
    By pippo42 in forum Qt Programming
    Replies: 5
    Last Post: 25th February 2010, 09:47
  4. Replies: 2
    Last Post: 16th May 2008, 14:39
  5. Editing properties of groups of widgets
    By Dusdan in forum Qt Tools
    Replies: 2
    Last Post: 18th August 2006, 12:51

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.