Reputation: 1171
I would like to create two layouts for my program. The first one would be showed to user after startup of program and would contains two push buttons - new/open project and the right side for recent projects. The second would be for entering the data and should be opened in the same window as first layout. Because I'm new to Qt, I don't know how to solve this problem - can be solved with code or Qt Creator's designer (.ui files)? Please provide an example, because I don't have any really experiance yet.
The second thing which I need to solve is to save recent projects, so the program can recognize them after it's closed. How to do that?
Upvotes: 0
Views: 552
Reputation: 51832
There are many ways to do this. The approach I would take is to create a QMainWindow and two widgets, each one containing the layout I want. I'd then set the widget I want to show as the main window's central widget with QMainWindow::setCentralWidget(). Make sure to hide() and show() the widgets as needed. You can also delete the first widget if you no longer need it.
For saving the list of projects, you can use QSettings.
Upvotes: 1
Reputation: 1899
I would recommend looking at a few tutorials on youtube, which I found to be very helpful as it's amazingly straight forward when demonstrated visually.
e.g. https://www.youtube.com/watch?v=2edb0VOkx-k
Upvotes: 0