English
Summary
Conclusions
A GUI application reacts to events. Layouts make a form adaptive, signals connect components, and slots perform short actions. Computations should be kept separate from widgets. Validation must be understandable to the user and keep the program in a correct state.
Self-check questions
- Why do you need a single
QApplicationand a call toexec()? - Why does
show()not replace the event loop? - How does the widget tree differ from the layout tree?
- When can a local widget without a parent disappear?
- Which tasks are the four main layouts intended for?
- Why is
QSpinBox.value()better than reading its text? - What do the
textChangedandtextEditedsignals mean? - Why are parentheses not added after the function name in
connect? - Where do you declare a custom
Signal, and how do you emit a value? - How do you avoid a loop in two-way recalculation?
- Why does a validator allow intermediate states?
- How does a single action appear in both a menu and a toolbar?
- Why can a timeout not be considered an exact time measurement?
- How do
pyside6-uicandQUiLoaderdiffer? - Which checks cannot be replaced by offscreen tests?