Results 1 to 8 of 8

Thread: Subclassing QWidget and QPushButton

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Subclassing QWidget and QPushButton

    you cannot inherit from two QObject clases...

    EDIT
    your widget class only has one virtual fucntion... so you can just skip the QWidget inheritance and the code will work.... but one more thing... inherit QPushButton first and then Widget otherwise u will get other errors..

    EDIT2

    do not delete the button in main()... your window will not show up..
    Last edited by nish; 24th July 2009 at 09:44.

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

    ber0y (24th July 2009)

Similar Threads

  1. Replies: 0
    Last Post: 11th November 2008, 15:36
  2. Qpushbutton
    By iamhere in forum Qt Programming
    Replies: 5
    Last Post: 15th October 2008, 04:40
  3. Dynamic updates of a QWidget in a QScrollArea
    By plamkata in forum Qt Programming
    Replies: 2
    Last Post: 20th July 2008, 23:45
  4. Dynamic widget not displayed upon Qwidget
    By ashukla in forum Qt Programming
    Replies: 5
    Last Post: 17th December 2007, 11:11
  5. Replies: 3
    Last Post: 8th March 2007, 14:54

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.