Results 1 to 3 of 3

Thread: Replacing Central Widget in Designer

  1. #1
    Join Date
    Apr 2007
    Posts
    20
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Replacing Central Widget in Designer

    I'm having a problem with Designer and the Designer plugin to Visual Studio.

    I'm trying to replace the central Widget on a (a QWidget) docking QMainWindow with a QTabWidget. It's easy in code but is there any way to do this in Designer?

    Thanks,
    Max

  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: Replacing Central Widget in Designer

    Quote Originally Posted by Max Yaffe View Post
    I'm trying to replace the central Widget on a (a QWidget) docking QMainWindow with a QTabWidget. It's easy in code but is there any way to do this in Designer?
    Do you mean setting QTabWidget as central widget? It's not possible from Designer. A main window project always has a plain QWidget as central widget. However, it's fairly possible by editing the .ui file by hand. Simply remove the "centralWidget" element which wraps the tab widget.
    J-P Nurmi

  3. The following 2 users say thank you to jpn for this useful post:

    bigboard (24th January 2008), Max Yaffe (11th July 2007)

  4. #3
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Replacing Central Widget in Designer

    Or, if you want to do everything in Designer, you can just use the QWidget and make the QTabWidget stretch all over it. You'll never notice the difference.
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

Similar Threads

  1. Replies: 10
    Last Post: 9th July 2007, 22:02
  2. QT4: Custom widget for QT Designer
    By Michiel in forum Qt Tools
    Replies: 4
    Last Post: 4th May 2006, 13:35
  3. Central Widget of QMainWindow
    By sumsin in forum Qt Programming
    Replies: 3
    Last Post: 13th March 2006, 18:32
  4. Replies: 4
    Last Post: 1st March 2006, 23:11
  5. Replies: 4
    Last Post: 6th February 2006, 14:30

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.