...
- Navigate to the
simple
subdirectory and runpydm simple.py
. This will launch a simple GUI: - Play with it. Note that the "selected options" output doesn't change until you click the "update status" button. It's meant to reflect the state of the checkboxes at the point the button is pressed
- Launch designer and open
simple.ui
- Note the Object Names in the Object Inspector:
- The checkboxes, push button, and output label all have custom names that reflect what they are (the standard names are typically not helpful and make connecting to them in python much harder)
- Note the different layouts; they allow for window resizing and snapping to grid
- Window resizing happens by right clicking the background of your widget and clicking Lay out to select the kind you want
- Note that we changed the window title in the Property Editor
- Note the Object Names in the Object Inspector:
- Open the tutorial repo with PyCharm and navigate to
simple.py
. Read through it and try to understand how the connections are happening (clicking through the provided links as necessary)
Exercises
...
Layouts in Designer
- Create and checkout a new branch called
layouts
- Right click the background of the widget and
...
- select
Lay out > Break Layout
...
- Notice that the GUI will no longer resize or snap to grid
...
- ; try to get it back to where it was
...
- Run
git status
and observe your changes - Git add, git commit, and git push your changes to your fork
Renaming Widgets in Designer
- Create and checkout a new branch called
rename_widgets
- Rename a widget in designer without changing the python file
...
- Note the error message and try to edit the python file to make it work again
- Run
git status
and observe your changes - Git add, git commit, and git push your changes to your fork
Introducing New Functionality
- Create and checkout a new branch called
auto_update
- Disable or delete the button
...
- in designer
- Use signals and slots to make the status label update whenever either of the checkboxes is toggled
- Run
git status
and observe your changes - Git add, git commit, and git push your changes to your fork
PV Readout
Info |
---|
This section will need the simulacrum sc_rf_service running. Please refer to prerequisites step 1 |
...