Results 1 to 3 of 3

Thread: Changing a window like a QWizard

  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Changing a window like a QWizard

    Hello!

    I'm planning a software that, in the same QMainWindow, should appear 3 completely different "group of things" (sorry, I couldn't find any better word ^^) and the change should be done by pressing a QComboBox. So for example when the software is initialized, a kind of window is shown, with some QWidgets, QPushButtons, some graphs and so forth. When the user changes the QComboBox, all this items mentioned should hide and other items should appear, such as a QTable, QGroupBox, etc..

    Now technically this is like a QWizard application: one button changes the entire window. But "A wizard's purpose is to guide the user through a process step by step. ", and that's not my point. I don't want a guide, such as those software installers, but only the possibility to change the window as I want.

    Some time ago I did a software that had a similar feature, but the changing was only a pair of QPushButtons and the window was small. So I only used a process of hide() and show() functions that did the job quite well.

    But this time I'm working with a complete QMainWindow with lots of items, and to use hide() and show() would be "noisy" and I also want to use the Ui interface to make things easier, so there is no way I'm going to write down all the initializations and positionings of all of my itens in this series of hide() and show() (if this is the unique way, I would prefer to change to a QTabWidget, but I want to use this option only in last case.)

    Is there a way for doing this? Can I, let us say, create 3 Forms and add the 3 to a unique MainWindow.cpp/MainWindow.h and than change the Ui when needed? Or is there another way? Or should I use QWizard anyway?


    Thanks!!

    Momergil


    Added after 1 33 minutes:


    Obs.: I noticed that I can put all the content in a QWidget and than use hide() and show() only to that widget. But in that case I would still have to create lots of things inside the .cpp file without the use of the Ui interface.
    Last edited by Momergil; 29th November 2011 at 14:28.

  2. #2
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Changing a window like a QWizard

    Oleg Shparber

  3. #3
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Changing a window like a QWizard

    Quote Originally Posted by Oleg View Post
    Thanks very much!


    Momergil

Similar Threads

  1. Replies: 0
    Last Post: 4th March 2011, 20:18
  2. Changing window states breaks window manager
    By sebastian.f in forum Newbie
    Replies: 3
    Last Post: 30th June 2009, 15:40
  3. window sizes changing even though max size defined
    By JonathanForQT4 in forum Newbie
    Replies: 3
    Last Post: 6th August 2007, 11:39
  4. Changing window's sizes
    By Salazaar in forum Newbie
    Replies: 6
    Last Post: 27th July 2007, 17:23
  5. Changing AlwaysOnTop window flag
    By bpetty in forum Newbie
    Replies: 5
    Last Post: 20th February 2007, 00:45

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.