[Qt-components] Key navigation

Zsombor Egri zsombor.egri at canonical.com
Tue Jan 8 08:44:29 CET 2013


On 01/08/2013 09:30 AM, Alberto Mardegan wrote:
> On 01/08/2013 06:18 AM, Zsombor Egri wrote:
>> Back in the "old times", when Borland's OWL was alive, each control
>> handling keys was having a tabOrder property, a numeric value defining
>> its index within the TAB-handling list. The list was defined on the Form
>> level, so even if you had groups or other layouting elements, the
>> content of those was also included in this ordering. How about having a
>> similar logic into the components too?
> Mmm... I think that would work well in most cases, but would not help 
> solve other cases: when items are re-used inside other components, and 
> when they are created dynamically.
For those we could define similar element as FocusScope that would act
as a proxy for the elements inside the reusable component.
> All what we need, in fact, is the information that an item should be 
> part of the focus chain; the order itself is relatively easy to find out 
> automatically from the item's position and hierarchy, and for the most 
> complex situations it can already be explicitly set with the 
> KeyNavigation property.
Well, how about if someone wants to have a different order than the one
defined by the defaultposition in the hierarchy? There can be situations
when the order is not the default one.

Zsombor



More information about the Qt-components mailing list