Results 1 to 6 of 6

Thread: QStackedWidget pass data between stacks and switch by pushbutton from the staks

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Cool Re: QStackedWidget pass data between stacks and switch by pushbutton from the staks

    First off, you have the concept of stacked widgets wrong....if you search this forum you can get the answers to most of your questions...for example look at this thread http://www.qtcentre.org/threads/3313...hlight=stacked. The widgets are placed on each page of the stacked widget, not separate forms for the stacked widget. I would strongly suggest getting a book on C++ and QT. But to help you out a bit, there are several ways to accomplish what you are looking for. In your main window, place the stacked widget, put the widgets that you want on each widget (change the "stack" by clicking on the arrow in the upper right corner of the stacked widget. Then you have to become familiar with signals and slots to navigate your forms or perform any action based on the users actions. In your case, one way is to right click on your button#1 and go to slots. Then click on the appropriate signal (clicked()). This will create the definition of your slot and you have to code in there what you want to do. All controls can be accessed by thier appropriate properties. I did a little down and dirty modification of your project as an example.
    stacknew.zip
    I hope this helps....I would get a book to help you understand and also search these forums...If you are a newbie, then your question probably has already been asked and answered.

  2. #2
    Join Date
    Nov 2010
    Posts
    18
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QStackedWidget pass data between stacks and switch by pushbutton from the staks

    Thank you for your help i was able to use the stackedWidget correctly with your explanation :-) I am reading a C++ book and a C++ QT book but sadly i dont have enough info from them yet. thus this is serving as a learning experience as well.

    Thank you for all the help

Similar Threads

  1. Replies: 5
    Last Post: 1st March 2010, 15:55
  2. Switch blue and red
    By bryan in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 19th January 2010, 15:23
  3. Switch GUI language of Creator 1.3.0?!?
    By Tiansen in forum Qt Tools
    Replies: 5
    Last Post: 12th January 2010, 14:33
  4. Replies: 0
    Last Post: 11th November 2008, 15:36
  5. How to switch Qt4 version
    By vieraci in forum Installation and Deployment
    Replies: 1
    Last Post: 1st May 2007, 18:17

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
  •  
Qt is a trademark of The Qt Company.