Parameter class of the setfocuspolicy () function
Qt: Enum focuspolicy {tabfocus \ clickfocus \ strongfocus \ wheelfocus \ nofocus}
Enum QT: focuspolicy
This Enum type defines the varous keys ies a widget can have with respect to acquiring keyboard focus.
Constant Value description
Qt: tabfocus 0x1 the widget accepts focus by tabbing.
Qt: clickfocus 0x2 the widget accepts focus by clicking.
Qt: strongfocus tabfocus | clickfocus | 0x8 the widget accepts focus by both tabbing and clicking. on Mac OS X this will also be indicate that the widget accepts tab focus when in 'text/list focus mode '.
Qt: wheelfocus strongfocus | 0x4 like QT: strongfocus plus the widget accepts focus by using the mouse wheel.
Qt: nofocus 0 the widget does not accept focus.
You must enable keyboard focus for a widget if it processes Keyboard Events. this is normally done from the widget's constructor. For instance, the qlineedit constructor CILS setfocuspolicy (QT: strongfocus ).
If the widget has a focus proxy, then the focus policy will be propagated to it.
Example:
UI-> textedit-> setfocuspolicy (QT: strongfocus );
UI-> textbrowser-> setfocuspolicy (QT: nofocus );