Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
GUI program structure
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 ?
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 ?
Zoptune last edited by Zoptune
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.
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)
WHen he clicks Button, the list should not be available anymore?
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.
If the wanted design is sort of Like wizard with Next and back
then QStackedWIdget is perfect and easy to use.
Thank you very much.