In C # there is ErrorProvider. Does Qt have something similar?
Not that I knew.
Probably the easiest way is to use QWidget :: setStylesheet () to set the background (or something else) to highlight the desired fields.
Adding an icon next to a required field - a red asterisk, say - will be quite simple: create a Field class using a horizontal layout with a widget for the required field icon, a shortcut and a "field" widget, and give it the setRequired (bool) function.
I think you can also use QStyle to create a custom widget.
source share