Example of Screen Refreshing with Widget
-
Hello All,
Currently, I need to design an interface where main window widgets get refreshed on the selection of a specific option.
As an example, if I select file-> new. A set of widgets will appear in the work area. If I choose file-> save as a new set of widgets will appear.
I went through all the examples of qt creator but could not find a way to implement the specific requirement. -
@Kira You can use https://doc.qt.io/qt-5/qstackedwidget.html
Or simply create widgets on the fly and show them.
In this example you can see how to add widgets: https://doc.qt.io/qt-5/qtwidgets-widgets-calculator-example.html# -
@jsulm : Thanks for the reply so what you are saying is that i create widgets based on the requirement and enable and disable them base on the requirement
-
@Kira Not enable/disable, but show/hide.
But you should check QStackedWidget - with this one you can easily switch between different sets of widgets. -
@jsulm : Actually i was looking for something like:
https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.screen?view=netframework-4.8
It is the below mentioned is similar to the above mentioned component
https://doc.qt.io/qt-5/qscreen.html -
@Kira I'm not sure how QScreen is related to what you asked originally?