Results 1 to 3 of 3

Thread: Cant use QWidget::setParent().

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Cant use QWidget::setParent().

    Your code uses private inheritance, all the methods of the base class are then private.

    You want public inheritance

    Qt Code:
    1. class Piece : public QPushButton{
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

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

    vitaR (2nd July 2014)

  3. #2
    Join Date
    Mar 2014
    Posts
    27
    Thanks
    9
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Cant use QWidget::setParent().

    Thanks, it works.

Similar Threads

  1. QObject::setParent across threads.
    By psih128 in forum Qt Programming
    Replies: 4
    Last Post: 21st January 2014, 16:01
  2. What happened when Qt Widget SetParent(NULL)
    By familymrfan in forum Newbie
    Replies: 1
    Last Post: 22nd October 2013, 06:54
  3. hwnd to qwidget setparent error
    By cic in forum Qwt
    Replies: 1
    Last Post: 27th August 2013, 14:40
  4. Replies: 2
    Last Post: 18th August 2011, 07:26
  5. Qt widget setParent
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 30th November 2007, 20:38

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.