I want to dynamically hide/show widget like so:
Default:
|-------|
| |
| text |
| editor|
|-------|
With webkit preview:
|-------|-------|
| | |
| text | web |
| editor| widget|
|-------|-------|
With okular preview:
|-------|-------|
| | |
| text | okular|
| editor| widget|
|-------|-------|
To set the general widget visibility, go to "Settings" -> "App Settings". In the box called "Widget State", click the arrow for the drop-down menu, scroll down, and select "hidden" or "standard" according to your needs. This will affect widget visibility on every page of your website.
isVisible. This property controls the visibility of a widget on the form. If set to false, the widget is not displayed. If set to true, the widget is displayed.
In the design area, right-click on Show Image dynamic panel to see the context menu. Select Set Hidden, the dynamic panel will disappear from the screen. The dynamic panel can be accessed by double-clicking under Outline: Page. Now, let us provide a click event to the button.
Just add all your widgets into the layout and use QWidget::hide()
, QWidget::show()
when needed.
For more complex situations you can use The State Machine Framework.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With