QtnProperty
QtnProperty copied to clipboard
Support Tab navigation
Hi, Alex Zhondin.
First, thanks for your QtnProperty library. It's nice.
And can you support Tab (Shift + Tab) to navigate to input next field?
Regards, Eric.
Hi Eric,
Is it standard behavior somewhere? I think Tab and Shift+Tab are supposed to navigate among controls in direct and reversed order. Now in QntProperty user can press "arrow down" to move selection one item down and press "enter" or "space" to start edit.
Do you need some single shortcut for these two steps?
Regards, Alex
Hi Alex,
Yes, you right. Almost software use the Tab key to navigate control (Tab in direct and Shift+Tab in reversed order). I know QtnProperty use "Arrow down/up"+"Enter" to navigate the controls. And I also try to re-implement it, but I still have to use the "Enter" key to start editing (Tab + "Enter).
So I want you help me merge them to the single shortcut.
Regards, Eric
OK, but Shift+Tab is reserved as standard shortcut for reversed navigation. What another keyboard combination do you want to use as "move next and edit" command?
"move next and edit" = Tab "move previous and edit" = Shift+Tab
Regards, Eric
I meant Tab already reserved for "Go to next control" and Shift+Tab - "Go to previous control". If you press Tab while on PropertyWidget now You will switch focus to the next control on the form.
You should choose other shortcuts.
OK, I meant.
"move next and edit" = Ctrl+Tab "move previous and edit" = Ctrl+Shift+Tab
Regards, Eric
OK
After some thinking I realize it's hard to implement now.
There are several possibilities for every property delegate:
-
Delegate doesn't support any input popup widget (like delegate for PropertyBool that directly handles mouse clicks and key presses). How Ctrl+Tab should work in this case?
-
Delegate has one QtnSubItem object that has input widget (for example delegate for PropertyFloat). Ctrl+Tab should activate input widget. Simple case.
-
Delegate has several QtnSubItem objects with different input widgets (I don't have such delegates now but can imagine something like PropertyDate where user can activate day, month or year widget independently). How Ctrl+Tab should work in this case?
-
Complex delegates (PropertySet, PropertyFont, PropertyEnumFlags ...) that have sub-properties. How Ctrl+Tab should work in this case?
So I know only solution for case 2 and have no any clear and simple solution for other cases.
What do you think?
P.S. If it hard to understand what I wrote I can make some pictures to illustrate my ideas.