Results 1 to 2 of 2

Thread: QSplitter taking parenthood over its widgets

  1. #1
    Join Date
    Jan 2011
    Posts
    32
    Thanks
    11
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QSplitter taking parenthood over its widgets

    I have custom made class that inherits QListView. I am creating object of this class with:
    Qt Code:
    1. list = new QCustomList(this);
    To copy to clipboard, switch view to plain text mode 
    form the widget, lets say widget1.

    Then this custom list is list is added to a QSplitter. When I try to get parentWidget from the custom widget I get that QSplitter is a parent. I keep m_parent at object creation to debug and this is what I get:
    widget1(0xa032ee8) = QSplitter(0xa035608)
    first pointer is m_parent and second is QCustomList->parentWidget()(the same is with parent()).

    Is this behavior normal?
    Should QSplitter really stole parenthood?
    Is this happenings with other classes?

    I have no problem in development. I am using m_parent and everything works fine. I am just curious to get answer on my questions.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSplitter taking parenthood over its widgets

    Quote Originally Posted by mak_user View Post
    Is this behavior normal?
    Yes.
    Should QSplitter really stole parenthood?
    Yes.
    Is this happenings with other classes?
    Yes.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    mak_user (5th April 2011)

Similar Threads

  1. Size proportions of widgets in QSplitter
    By Boron in forum Qt Programming
    Replies: 2
    Last Post: 9th October 2009, 18:25
  2. How to remove widgets from QSplitter?
    By mcb in forum Qt Programming
    Replies: 2
    Last Post: 23rd July 2009, 06:10
  3. How to set Widgets sizes with in QSplitter
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2007, 07:38
  4. QSplitter - Remove Widgets?
    By durbrak in forum Qt Programming
    Replies: 1
    Last Post: 10th December 2006, 12:17
  5. Remove widgets from a QSplitter
    By blukske in forum Qt Programming
    Replies: 1
    Last Post: 14th July 2006, 10:38

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.