KComboBox focus

Benoit Walter b.walter at free.fr
Thu Sep 18 19:10:22 BST 2003


The problem is that it is not convenient to switch between styles/decorations/
backgrounds without keyboard focus. I know the QComboBox behaves as you 
described, I just think it is much more convenient to use if you get the 
focus after clicking on it.
Most of the time, you select a background image from the combo box, then you 
navigate between backgrounds using the arrows.
If a click focus really bothers for a combo box that is not editable, what 
about changing the focus policy of those widgets directly in the control 
center modules ?


On Thursday 18 September 2003 18:57, Dawit A. wrote:
> On Thursday 18 September 2003 11:42, Benoit Walter wrote:
> > As the number of KComboBoxes is increasing in the control center
> > (background images, styles and window decorations), I think it would make
> > sense to give focus to the widget after clicking on it. Then it will be
> > much easier to try different entries using the keyboard (arrows).
> >
> > Would it be OK to change kdelibs/kdeui/kcombobox.cpp, void init() and
> > add: setFocusPolicy( StrongFocus ); ?
>
> No. Please read the documentation for QCombobox:
>
> If the combobox is not editable then it has a default focusPolicy() of
> TabFocus, i.e. it will not grab focus if clicked. This differs from both
> Windows and Motif. If the combobox is editable then it has a default
> focusPolicy() of StrongFocus, i.e. it will grab focus if clicked.




More information about the kde-core-devel mailing list