Results 1 to 2 of 2

Thread: QSplitter - Remove Widgets?

  1. #1
    Join Date
    Oct 2006
    Location
    Germany
    Posts
    84
    Thanks
    5
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QSplitter - Remove Widgets?

    Hello,
    I have a couple of widgets in a QSplitter. Now the user should be able to "undock" some of those widgets. So how do I remove a widget from a splitter? I know that QWidget::hide() and "delete myWidget" can do this but neither of these options are available to me since the widget won't be hidden afterwards and it most certainly cannot be deleted (the user will keep using it).
    So how do I "move" a widget from a QSplitter right into a QDialog so the widget will be removed from the QSplitter? QSplitter doesn't have a method like takeItem() or removeWidget() or something.

    Thank you.

  2. #2
    Join Date
    Oct 2006
    Location
    Germany
    Posts
    84
    Thanks
    5
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSplitter - Remove Widgets?

    Never mind. I think QDialog takes ownership of the widget and QSplitter loses it and therefore removes it automatically from itself.

Similar Threads

  1. Remove widgets from a QSplitter
    By blukske in forum Qt Programming
    Replies: 1
    Last Post: 14th July 2006, 10:38
  2. Replies: 11
    Last Post: 7th July 2006, 13:09
  3. Replies: 3
    Last Post: 25th March 2006, 06:15
  4. Creating Widgets
    By hylke in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2006, 08:37
  5. QSettings again ... how to remove array elements
    By Mike in forum Qt Programming
    Replies: 4
    Last Post: 11th January 2006, 08:58

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.