Results 1 to 2 of 2

Thread: Windows and forms (for a Wizzard)

  1. #1
    Join Date
    Jan 2010
    Posts
    3
    Platforms
    Windows

    Default Windows and forms (for a Wizzard)

    Hello all!
    I'm trying to do something, and I can't figure it out... I'm a total newbee, so be patient ;o)
    I want to develop a sort of wizzard for the creation of a database object. My main window (menu) only has buttons on it, and when the user selects one button, it opens another window that I want to behave like a wizzard, meaning that I have a next button and I want all my forms to appear in the same window, and when I get to the end (and click 'finish' or something), my window closes and I return to the main window (with my buttons on it).
    What I tried is to open a new window A (QMainWindow) when I click on the next button, and then, open a new window B (QWidget) that is a son of A (so it displays it inside). The problem is that it is shown in transparency, I see the contents of window A as a background of my window B, and when I close window B, I return to window A (and I want to return to the menu).
    I can't use QWizard because I want to repeat one page as many times as the user wants to
    Here is the workflow
    A -> next -> B -> next -> B -> next -> B -> Finish -> Back to menu.
    What would be the best practice to do this? What kind of windows and what classes/ui do I have to create and how can I make them follow each other?
    Thanks a lot for your time
    Regards
    Neil.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Windows and forms (for a Wizzard)

    I can't use QWizard because I want to repeat one page as many times as the user wants to
    You can still use QWizard.
    In the next() slot you can evaluate if the wizard should go to the next page or not and call next() or back() as you need, just like you did in your try, but the whole wizard frameword is there for your to use done by Qt.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Multiple Forms and vertical layout in forms
    By eva2002 in forum Qt Programming
    Replies: 0
    Last Post: 13th January 2010, 05:05
  2. How to communicate between two forms
    By iamjayanth in forum Qt Programming
    Replies: 2
    Last Post: 7th April 2009, 08:17
  3. Layouting "Windows.Forms" like Qt forms
    By Boron in forum Qt Tools
    Replies: 1
    Last Post: 29th April 2008, 22:01
  4. using functions in different forms
    By vishnu5 in forum General Programming
    Replies: 1
    Last Post: 4th February 2008, 19:37
  5. Forms or QStackedWidget
    By hgedek in forum Newbie
    Replies: 1
    Last Post: 5th November 2007, 21:35

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.