258 views
in GUI Development by
Is there any example for a navigation like this:
- first view with som buttons
- press one of these buttons to open a second view with some buttons
- press one of these buttons to open a third view with some buttons

The third view should have one button to return to the second view and another button to return to the first view (a kind of "home" button.

1 Answer

0 votes
by

Hello,

one of the possible approaches to achieve this is following:

1. In the first component, connect the buttons to individual slot methods.

2. In the slot methods implement code to dynamically create and show a new instance of the second component. 

See the section: Access the root object. It demonstrates how to dynamically create and show an instance of a potential alert panel. See also the section: Compose the component programmatically for more details how you dynamically create/show and hide/remove components. 

3. Every time you show the second, third, ... component, make it modal.

This technique provides a kind of history mechanism permitting you to track all actually opened components. See the section: Modal GUI components.

4. In the second, third, ... component connect the 'Return' buttons to own slot methods.

5. In these slot methods implement code to end the modal state and to hide/remove the affected component. This restores the state of the preceding view.

An example demonstrating the navigation is found at the end of the section Modal GUI components.

Hope it helps you further

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...