Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Main Window with variable Content.
Forum Updated to NodeBB v4.3 + New Features

Main Window with variable Content.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 570 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Josz
    wrote on last edited by
    #1

    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.png

    That 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

    JonBJ 1 Reply Last reply
    0
    • J Josz

      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.png

      That 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

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by JonB
      #2

      @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.

      J 1 Reply Last reply
      4
      • JonBJ JonB

        @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.

        J Offline
        J Offline
        Josz
        wrote on last edited by
        #3

        @JonB Thank you very much John, I Look it.

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved