Results 1 to 6 of 6

Thread: Custom Widget constructor and registration problem.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Custom Widget constructor and registration problem.

    You don't need to call Q_DECLARE_METATYPE on your custom widget - since it is a QObject already (its a sublcass of QStackedWidget).
    Q_DECLARE_METATYPE is for non Qt types that you would like to add to use with the signal slot system and QVariant usage.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  2. The following user says thank you to high_flyer for this useful post:

    stepchik (11th March 2012)

Similar Threads

  1. Custom type registration on QVariant & toString()
    By zickedi in forum Qt Programming
    Replies: 10
    Last Post: 4th March 2012, 00:34
  2. Custom Widget Constructor
    By qtoptus in forum Qt Programming
    Replies: 1
    Last Post: 11th May 2010, 16:05
  3. Replies: 1
    Last Post: 22nd April 2010, 14:34
  4. Replies: 2
    Last Post: 22nd April 2010, 11:44
  5. DBus Registration problem
    By nrabara in forum Newbie
    Replies: 1
    Last Post: 30th April 2009, 10:34

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.