[Qt-components] Key navigation
Alberto Mardegan
mardy at users.sourceforge.net
Tue Jan 29 06:27:23 CET 2013
On 01/28/2013 04:48 PM, Qi Liang wrote:
> Talked with Jens today, maybe we should be better to be compatible
> with old focus behaviors. I think all children items under
> FocusScope, and all has "focus:true" and "focus:false" should be
> considered want to have focus(at least TabFocus). Alan, could you
> correct this?
This seems reasonable, though (as someone pointed out in some earlier
conversation) assigning more than a meaning to a property is generally bad.
I would rather add an explicit "canFocus" property, which simply toggles
the isFocusScope flag on the item (or a new flag, but I think that
isFocusScope is exactly what we need here, despite the strange name).
Since the main use case of keyboard navigation is when using (desktop)
components, I think that having to specify an additional "canFocus"
property in order for your widget to be part of the focus chain is not a
big issue; and all the default components could have this flag set by
default, so in most cases the user wouldn't need to care about it at all.
Ciao,
Alberto
More information about the Qt-components
mailing list