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. GUI program structure
Qt 6.11 is out! See what's new in the release blog

GUI program structure

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 1.9k 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.
  • ZoptuneZ Offline
    ZoptuneZ Offline
    Zoptune
    wrote on last edited by
    #1

    Hi,

    I'm working on a project where there is 2 different step.
    1.The user select an item in a list.
    2. By clicking on "details" button, the user access to the selected item details.

    But i don't know how to structure my code.
    Do i need to create to different frame in the mainwindow ? And how do i switch between these 2 frame ?

    Thx

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

      Hi and welcome
      Why do you want frames?
      What will display the details?
      Some QLabels or ??

      Will you use Models and Views or
      something more simple?

      How is the data stored?
      you have some struct with data ?

      1 Reply Last reply
      0
      • ZoptuneZ Offline
        ZoptuneZ Offline
        Zoptune
        wrote on last edited by Zoptune
        #3

        Hi,

        I think i'm not using appropriate words (not very good in english).

        I want one "home page" with a list and a "details" button.
        Once the user selected and item and clicked on the button, the page change to display item details (mostly labels).
        I don't want to open a new window.

        I heard that a stackedWidget could be a solution.

        mrjjM 1 Reply Last reply
        0
        • ZoptuneZ Zoptune

          Hi,

          I think i'm not using appropriate words (not very good in english).

          I want one "home page" with a list and a "details" button.
          Once the user selected and item and clicked on the button, the page change to display item details (mostly labels).
          I don't want to open a new window.

          I heard that a stackedWidget could be a solution.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @Zoptune
          Hi
          Yes, qstackedwidget is good for concept of pages/screens.

          But nothing stop you from having a List and say a QTableWidget
          and when u click in list, the Tablewidget shows the Details.
          This is all in same window.
          If nothing selected in List, Table is empty,. (start situation)

          Oh. Update:
          WHen he clicks Button, the list should not be available anymore?

          1 Reply Last reply
          0
          • ZoptuneZ Offline
            ZoptuneZ Offline
            Zoptune
            wrote on last edited by
            #5

            I think QStackedWidget is the more appropriate solution for me.

            On the "details" page, the user have a "back" button to go back to the "home" page.
            The list is filled with a SQL query and have to be refreshed every time the user go back to the "home" page or every minutes to avoid missing new items in the DB.

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

              I agree.
              If the wanted design is sort of Like wizard with Next and back
              then QStackedWIdget is perfect and easy to use.

              1 Reply Last reply
              1
              • ZoptuneZ Offline
                ZoptuneZ Offline
                Zoptune
                wrote on last edited by
                #7

                Thank you very much.

                1 Reply Last reply
                0

                • Login

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