Results 1 to 7 of 7

Thread: simple button

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: simple button

    It sounds like your creating a wizard - multiple pages and a button to go from one page to the next.

    If so, instead of doing that, take a look at QWizard - http://doc.qt.nokia.com/4.7/qwizard.html

  2. The following user says thank you to squidge for this useful post:

    wreckx (19th November 2010)

  3. #2
    Join Date
    Nov 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default Re: simple button

    Thank you for your reply Squidge.

    actually i want to call my xxxx.UI pages .. 4 pages in total "just like a website"


    ok here are the plan :


    -button Map ---> go to page1.ui (Forms)

    -button Fair ---> go to page2.ui (Forms)

    -button Attraction ---> go to page3.ui (Forms)

    -button About BTS ---> go to page4.ui (Forms)


    each button goes to different Forms.UI i really need something to call the Forms.ui because i made all differentes pages with different forms .. i use that for the design

    when i create a button in my Forms.UI i insert a push button then right click and Go to slot.. then choose "Clicked()" and i have this script come out


    void MainWindow: On_pushButton_clicked()
    {

    }


    can i just write something here to call the other Form (page2.ui) page on the button ??


    like for exemple

    void MainWindow: On_pushButton_clicked()

    {

    on clicked "fair button" -> show page2.ui

    etc.....

    }


    then for page 3

    void MainWindow: On_pushButton_clicked()

    {

    on clicked "attraction button" -> show page3.ui

    etc.....

    }


    ???????????????????????????


    thank you

    Max

  4. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: simple button

    All the other pages derived from QDialog? If so, just use
    Qt Code:
    1. dialogName->exec();
    To copy to clipboard, switch view to plain text mode 
    to open the form.

    like so:

    Qt Code:
    1. void MainWindow:On_pushButton_clicked()
    2. {
    3. page2->exec();
    4. }
    To copy to clipboard, switch view to plain text mode 

    of course 'page2' has be created somewhere (either on the stack or dynamically using 'new')

  5. The following user says thank you to squidge for this useful post:

    wreckx (20th November 2010)

Similar Threads

  1. Changing text of button in no relation to button
    By Sabre Runner in forum Newbie
    Replies: 22
    Last Post: 23rd September 2010, 12:29
  2. Simple chat
    By kernel.roy in forum Newbie
    Replies: 5
    Last Post: 9th September 2010, 19:37
  3. Replies: 6
    Last Post: 21st August 2010, 21:09
  4. Replies: 1
    Last Post: 2nd August 2010, 05:40
  5. Custom widget: a button within a button
    By Gnurou in forum Qt Programming
    Replies: 7
    Last Post: 18th June 2009, 09:03

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.