Results 1 to 2 of 2

Thread: how to remove the pages of QToolBox?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2011
    Posts
    160
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default how to remove the pages of QToolBox?

    I have a QToolBox, initially only one page will be there
    Latter in run time i'm adding few more pages to it....
    Now if click on"clear" button, all the pages except 1st page should remove...
    How can i do that?

    I tried using
    void QToolBox::removeItem ( int index )
    but it is not deleting the removed item....

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: how to remove the pages of QToolBox?

    Quote Originally Posted by aurora View Post
    Now if click on"clear" button, all the pages except 1st page should remove...
    How can i do that?
    By removing all the items except the first

    I tried using
    void QToolBox::removeItem ( int index )
    but it is not deleting the removed item....
    As the friendly docs say,
    void QToolBox::removeItem ( int index )

    Removes the item at position index from the toolbox. Note that the widget is not deleted.
    If you want the object deleted, then delete it yourself.

Similar Threads

  1. QToolBox pages visibility
    By creep33 in forum Qt Programming
    Replies: 3
    Last Post: 8th September 2010, 14:43
  2. QToolBox
    By kavinsiva in forum Qt Programming
    Replies: 1
    Last Post: 11th August 2009, 06:19
  3. qtoolbox
    By mickey in forum Qt Programming
    Replies: 3
    Last Post: 1st June 2006, 17:27
  4. QToolBox
    By mickey in forum Newbie
    Replies: 4
    Last Post: 11th February 2006, 15:03
  5. QToolBox
    By mickey in forum Newbie
    Replies: 1
    Last Post: 9th February 2006, 21:21

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.