Results 1 to 10 of 10

Thread: Remove tabs from TabWidget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Remove tabs from TabWidget

    Quote Originally Posted by jmrbcu View Post
    setParent(None) doesn't work, the only thing that work is:
    Did you check in PyQt docs what works?

  2. #2
    Join Date
    Apr 2010
    Posts
    6
    Qt products
    Qt4 Qt/Embedded

    Default Re: Remove tabs from TabWidget

    the qt documentation for tabwidget is almost the same so, I don't know where to look.

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

    Default Re: Remove tabs from TabWidget

    I don't mean how to delete pages in tab widget but rather how to delete Qt objects in PyQt in general. I'm sure there is a dedicated call there somewhere to convince the Python garbage collector it should get rid of the object.

  4. #4
    Join Date
    Apr 2010
    Posts
    6
    Qt products
    Qt4 Qt/Embedded

    Default Re: Remove tabs from TabWidget

    I think that doing:

    widget.close()
    widget.deleteLater()
    del widget

    # and optionally this if U really must
    import gc
    gc.collect()

    will do the trick

Similar Threads

  1. Add tab to tabwidget thru Designer.
    By phillip_Qt in forum Qt Programming
    Replies: 2
    Last Post: 13th January 2010, 11:00
  2. TabWidget's Tab's parent
    By alisami in forum Qt Programming
    Replies: 12
    Last Post: 31st March 2009, 13:30
  3. Creating empty TabWidget (without any tabs)
    By momesana in forum Qt Tools
    Replies: 2
    Last Post: 2nd December 2007, 10:22
  4. TabWidget
    By Salazaar in forum Newbie
    Replies: 5
    Last Post: 17th May 2007, 21:07
  5. tabWidget Question
    By phlash in forum Qt Tools
    Replies: 1
    Last Post: 28th March 2007, 10: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.