show sample UI we've made for a multi-page/screen layout of a Path-Following Robot.
files include:
- .py file - the main code of each window / screen. graphics depend on the respective .ui file and also contains the functions for buttons and other inputs
- .ui file - the interface that can easily be used / manipulate through the Qt designer.
it hase four widgets (controls UI, main UI, status UI, password UI). The MyGUI.py serves as the main window as well and utilizes QStackedWidget() to select which among the four widgets is currently displayed. It also contains the functions that needs to work with other screem's objects.
pip install pyside6
- Different screens layouts are made and compiled with their own python files (main, password, control, status)
- different screen layouts are compiled in the MyGUI.py within a single GUI class, importing a sub-class for each screen and their own methods. Can also access the layout items from other screens.
- GUI Class creates the actual window and StackedWidget. Each sub-class gets its own Widget page and can be called which is active at the moment.
- This can keep all the other widgets / screens active and working with each of their computations. Make sure no heavy lifting is done in any screen that may block or slow the whole system.
Note: Adding loops will halt the display functionality, use PySide6's built-in functions to handle threading.
- Make sure Pyside6 is installed.
- Run MyGUI.py
- Select any option in the Control Window
- The Password Window will show. Clear the text and enter '0000' to proceed back to the Control Window