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. How to update mainwindow?

How to update mainwindow?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 795 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.
  • Hanna LarssonH Offline
    Hanna LarssonH Offline
    Hanna Larsson
    wrote on last edited by
    #1

    Hi!

    I have a main window (with widgets) that I want to keep using after a certain action (clicking New Project). I want the window to update/repaint with new widgets, but still have the same menu etc. How do I do this? Is there a better way to do this?

    Hanna

    Bonjour!

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

      Hi and welcome
      Im not 100% sure what design you are after.

      if something like - you have a mainwindow and it has "pages"
      with different set of widgets then
      a QStackedwidget is easy to use for that.
      You can set it all up in designer and simply switch page when you want
      other widgets shown.
      The main menu will stay same place.

      http://doc.qt.io/qt-5/qstackedwidget.html

      Hanna LarssonH 1 Reply Last reply
      3
      • mrjjM mrjj

        Hi and welcome
        Im not 100% sure what design you are after.

        if something like - you have a mainwindow and it has "pages"
        with different set of widgets then
        a QStackedwidget is easy to use for that.
        You can set it all up in designer and simply switch page when you want
        other widgets shown.
        The main menu will stay same place.

        http://doc.qt.io/qt-5/qstackedwidget.html

        Hanna LarssonH Offline
        Hanna LarssonH Offline
        Hanna Larsson
        wrote on last edited by
        #3

        @mrjj Yes, thank you!

        Bonjour!

        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