Main Window with variable Content.
-
Hello Community,
I would like to learn how design a main window with Variable Content, like in the next link:
https://i.postimg.cc/02djkg2m/Screens.pngThat means, that some icon on the first screen from MainWindow is pressed , the second screen will be showed on the same MainWindow.
I don’t know how to begin. I suppose that could I use a LayOut objects vector, where each object represents the different layers (or faces) from the MainWindow and for each layer could use the “.hide” and “.show” methods...
but in QVBoxLayout *mainLayout = new QVBoxLayout(ui->centralWidget); QVLayout don't accept the ".hide" and ".show" methods.
Please, any help will be welcomed. (links to manuals, Ideas... etc)
Thanks in advance
-
Hello Community,
I would like to learn how design a main window with Variable Content, like in the next link:
https://i.postimg.cc/02djkg2m/Screens.pngThat means, that some icon on the first screen from MainWindow is pressed , the second screen will be showed on the same MainWindow.
I don’t know how to begin. I suppose that could I use a LayOut objects vector, where each object represents the different layers (or faces) from the MainWindow and for each layer could use the “.hide” and “.show” methods...
but in QVBoxLayout *mainLayout = new QVBoxLayout(ui->centralWidget); QVLayout don't accept the ".hide" and ".show" methods.
Please, any help will be welcomed. (links to manuals, Ideas... etc)
Thanks in advance
@Josz
I don't know if a Qt expert knows better than this for the main window case, but when you have varying "pages" you wish to display replacing one another have a look at the "stacked" classes http://doc.qt.io/qt-5/qstackedlayout.html & http://doc.qt.io/qt-5/qstackedwidget.html. -
@Josz
I don't know if a Qt expert knows better than this for the main window case, but when you have varying "pages" you wish to display replacing one another have a look at the "stacked" classes http://doc.qt.io/qt-5/qstackedlayout.html & http://doc.qt.io/qt-5/qstackedwidget.html. -
Hi
Also be aware of the
http://doc.qt.io/qt-5/qwizard.html
Which is a small framework for having any kind of Wizard like flipping of "screens" based on dialogs.
However, if its truly meant to be inside MainWindow,
QStackedWidget might fit better.