Results 1 to 3 of 3

Thread: Adding more tab widgets

  1. #1
    Join Date
    Aug 2009
    Posts
    56
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Adding more tab widgets

    Is there a way to instance a template for the contents of a tab, for a QTabWidget? What I mean is that in QT designer I setup one page of the tab widget with a lot of widgets in it. Then in C++, when the user presses a button, I'd like to add a new tab which has all the same widgets as the first page.

    If not, I'll make a new .ui file with just the contents of the tab, and attach that widget each time I add a new tab.

  2. #2
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Thanks
    2
    Thanked 29 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Adding more tab widgets

    What you wrote in the last sentence is exactly what I would do.

  3. #3
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Adding more tab widgets

    I think you can tell designer to add an extra tab to the tab widget.

    In any case in C++ you can just define a new widget and add it to the tab widget.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

Similar Threads

  1. Adding widgets dynamically
    By miw in forum Qt Programming
    Replies: 1
    Last Post: 23rd July 2009, 10:31
  2. Adding new Widgets in a seperate thread
    By Cruz in forum Qt Programming
    Replies: 7
    Last Post: 16th January 2009, 18:20
  3. Replies: 4
    Last Post: 2nd December 2008, 04:19
  4. adding and removing widgets
    By eric in forum Qt Programming
    Replies: 1
    Last Post: 30th November 2007, 01:34
  5. adding widgets to tabWidgets pages
    By quickNitin in forum Newbie
    Replies: 1
    Last Post: 23rd November 2006, 09:59

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.