Results 1 to 4 of 4

Thread: show another ui form

  1. #1
    Join Date
    May 2012
    Posts
    33
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default show another ui form

    hi all... im writing a QT gui application... and i wana show a seconde form in my application...
    so i add a new QT designer form to my project and named it as "secondeform.ui"...
    So how can i show this form for example when i pressing a button??
    thank u all

  2. #2
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Thanks
    29
    Thanked 50 Times in 47 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Cool Re: show another ui form

    Just create the class of that form and then create the object of that form class in your original class and call the show function whenever you're clicking on the button.


    Added after 7 minutes:


    See this example. May be you'll get some help from this---->

    d3emo.zip
    Last edited by sonulohani; 16th July 2012 at 09:53.
    Heavy Metal Rules. For those about to rock, we salute you.
    HIT THANKS IF I HELPED.

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

    k.qasempour (16th July 2012)

  4. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: show another ui form

    Just a little detail to what sonulohani said: if you use show (without modal window flags) you need to allocate memory on the heap for the second dialog/window (see this FAQ for details) and sample code for your original question can be found in this FAQ.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: show another ui form

    Quote Originally Posted by k.qasempour View Post
    hi all... im writing a QT gui application... and i wana show a seconde form in my application...
    so i add a new QT designer form to my project and named it as "secondeform.ui"...
    So how can i show this form for example when i pressing a button??
    thank u all
    http://www.qtcentre.org/faq.php?faq=...esigner_2forms
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 1
    Last Post: 14th April 2011, 10:40
  2. Replies: 7
    Last Post: 23rd January 2010, 22:59
  3. Run an application but show it in your own form?
    By triperzonak in forum Qt Programming
    Replies: 6
    Last Post: 27th September 2008, 02:37
  4. show form
    By mattia in forum Newbie
    Replies: 2
    Last Post: 26th October 2007, 10:20
  5. Show or hide a form
    By Gayathri in forum Newbie
    Replies: 11
    Last Post: 17th November 2006, 12:39

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.