Results 1 to 3 of 3

Thread: How to combine the ui file generated by QtDesigner?

  1. #1
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default How to combine the ui file generated by QtDesigner?

    MainWindow.ui
    Untitled.jpg

    page1.ui
    Untitled1.jpg

    project layout
    Untitled2.jpg


    I want to add the page1.ui into the QTabWidget of the MainWindow.ui
    anyway to do that by QtDesigner(without manual hand codings)?
    if this is impossible, which kind of solutions would you pick?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to combine the ui file generated by QtDesigner?

    Add a widget to the tab in MainWindow.
    Then right click and "promote" it. In the dialog specify the include for the class that will implement page1.ui and promote.
    The class name of the widget will change to the class name you have specified.

    When uic generates the code for MainWindow, it will generate an include for the specified header and instantiate the specified class in place of the widget.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    stereoMatching (30th January 2014)

  4. #3
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to combine the ui file generated by QtDesigner?

    Thanks, this works like magic

Similar Threads

  1. Replies: 3
    Last Post: 3rd August 2010, 14:12
  2. Replies: 0
    Last Post: 1st August 2009, 09:05
  3. Replies: 2
    Last Post: 20th December 2008, 06:17
  4. How to get *.exe from *.ui generated by QtDesigner?
    By Shuchi Agrawal in forum Qt Tools
    Replies: 6
    Last Post: 11th February 2007, 19:15
  5. Replies: 10
    Last Post: 27th November 2006, 20:37

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.