Results 1 to 9 of 9

Thread: how to remove tab with closable button.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Sep 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2

    Default

    ok so i tried(did not try to handle memory leeks)
    Qt Code:
    1. QObject::connect(Tabs, SIGNAL(tabCloseRequested(int)),
    2. Tabs, SLOT(removeTab(int)));
    To copy to clipboard, switch view to plain text mode 
    i thought that if this worked then i would make a function in my MainWindow class that would both delete the content and remove the tab but this did not work, what am i doing wrong?

    i got it to work!! i used a function that deleted the allocated widgit with deleteLater, i used

    Qt Code:
    1. QObject::connect(Tabs, SIGNAL(tabCloseRequested(int)),
    2. this, SLOT(RemoveTab(int)));
    To copy to clipboard, switch view to plain text mode 
    , thanks for helping
    Last edited by wysota; 20th September 2010 at 07:40.

Similar Threads

  1. Remove max,min button on a QMainWindow
    By Krish_ng in forum Qt Programming
    Replies: 9
    Last Post: 3rd August 2012, 13:36
  2. Closable dockwidgets
    By Kal in forum Qt Programming
    Replies: 0
    Last Post: 24th October 2008, 21:32
  3. Remove close button on a Dialog in Linux
    By Krish_ng in forum Qt Programming
    Replies: 5
    Last Post: 20th July 2007, 07:10
  4. Remove restore button
    By vermarajeev in forum Qt Programming
    Replies: 3
    Last Post: 26th June 2007, 13:29
  5. Replies: 6
    Last Post: 21st February 2007, 20:35

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.