Results 1 to 4 of 4

Thread: Launching new form by a button click in qt gui application?

  1. #1
    Join Date
    Feb 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Launching new form by a button click in qt gui application?

    Hi im a newbie to QT im trying upon some simple applications.. i'd like to know how to launch a new form by clicking a button from main window.. please explain me with a simple example.. when i create a new project say myqt it'll generate 1) a from "mainwindow.ui" 2) a header "mainwindow.h" 3) two source files "main.cpp" and "mainwindow.cpp".. now i need to add a from say "myform.ui" how do i launch or make the form visible when i press a button from "mainwindow" gimme some tutorials..

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

  3. #3
    Join Date
    Apr 2010
    Location
    Almaty
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Launching new form by a button click in qt gui application?

    You can make a button then add slot that will show it smt like
    connect(button, SIGNAL(clicked), this, slotShow());

    in slot show
    widget x = new widget();
    x->show();

  4. #4
    Join Date
    Feb 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Launching new form by a button click in qt gui application?

    Thanks dude!!

Similar Threads

  1. Launching GUI application on different X11 display
    By basy in forum Installation and Deployment
    Replies: 3
    Last Post: 3rd December 2010, 21:21
  2. Replies: 2
    Last Post: 17th September 2010, 12:44
  3. How can I know which button click.
    By electronicboy in forum Qt Programming
    Replies: 10
    Last Post: 4th October 2009, 15:27
  4. Replies: 5
    Last Post: 15th June 2007, 23:08
  5. Replies: 4
    Last Post: 31st August 2006, 13:11

Tags for this Thread

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.