Results 1 to 2 of 2

Thread: Custom tab in QT4

  1. #1
    Join Date
    Aug 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Custom tab in QT4

    I am wanting to create custom tabs (a little different functionality dependent on selection on main tab) for my application. Essentially, I want to create subclasses of the tab widget created in the Designer, and instantiate a certain one, as specified by a selection on the main tab. I can't seem to figure out how to get this accomplished using the designer. In looking at the code generated from the Designer, it looks like I could just substitute my class into the calls that create the individual tabs that are then added to the QTabWidget, but how do I do this without actually editing the Qt-generated code after the fact, and losing it when the UI changes? Will this have to be custom code? I want to maintain the ease of editing the dialogs/forms with the Designer.

    Thanks!


    Rob

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Custom tab in QT4

    See Using Custom Widgets with Qt Designer - Promoting Widgets. In short, choose "Promote to..." from the context menu of a child widget in designer.
    J-P Nurmi

Similar Threads

  1. picking geometry in qt custom widgets
    By notsonerdysunny in forum Qt Programming
    Replies: 2
    Last Post: 17th July 2007, 23:01
  2. Replies: 1
    Last Post: 5th March 2007, 20:50
  3. Custom Widget Plugin Analog Clock
    By kemp in forum Qt Programming
    Replies: 8
    Last Post: 11th August 2006, 13:22
  4. Custom Qt dll name
    By tony007 in forum Installation and Deployment
    Replies: 2
    Last Post: 10th March 2006, 15:29
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.