May 2019
Intermediate to advanced
542 pages
13h 37m
English
Although Qt provides a wide range of ready-made input widgets for things such as dates and numbers, we may find sometimes that we need a widget with very specific constraints on its input values. Such input constraints can be created using the QValidator class.
The workflow is like this:
Once assigned to an editable widget, the validate() method will be called every time the user updates the value of the widget (for example, every keystroke in QLineEdit) and will determine whether the input is accepted.
Read now
Unlock full access