Dynamic Layouts Example#
Shows how to re-orient widgets in running applications.
Dynamic Layouts implements dynamically placed widgets within running applications. The widget placement depends on whether
Vertical is chosen.
For more information, visit the Layout Management page.
To begin with, the application creates the UI components by calling the following methods:
It then adds the UI components to a GridLayout (
Dialog::rotateWidgets() is called.
Creating the Main Widgets#
createRotatableGroupBox() method creates a rotatable group box, then adds a series of widgets:
It goes on to add signals and slots to each widget, and assigns a
createOptionsGroupBox() creates the following widgets:
buttonsOrientationComboBox. The orientation of the ComboBox is either
horizontal(default value) or
vertical. These two values are added during the startup of the application. It is not possible to leave the option empty.
Rotating the Widgets#
Removes the current widgets and activates the next widget.
Running the Example#
To run the example from Qt Creator , open the Welcome mode and select the example from Examples. For more information, visit Building and Running an Example.