Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Tab navigation #23

Open
levanhong05 opened this issue Jan 23, 2017 · 8 comments
Open

Support Tab navigation #23

levanhong05 opened this issue Jan 23, 2017 · 8 comments

Comments

@levanhong05
Copy link

levanhong05 commented Jan 23, 2017

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.

@lexxmark
Copy link
Collaborator

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

@levanhong05
Copy link
Author

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

@lexxmark
Copy link
Collaborator

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?

@levanhong05
Copy link
Author

"move next and edit" = Tab
"move previous and edit" = Shift+Tab

Regards,
Eric

@lexxmark
Copy link
Collaborator

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.

@levanhong05
Copy link
Author

OK, I meant.

"move next and edit" = Ctrl+Tab
"move previous and edit" = Ctrl+Shift+Tab

Regards,
Eric

@lexxmark
Copy link
Collaborator

OK

@lexxmark
Copy link
Collaborator

After some thinking I realize it's hard to implement now.

There are several possibilities for every property delegate:

  1. 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?

  2. Delegate has one QtnSubItem object that has input widget (for example delegate for PropertyFloat).
    Ctrl+Tab should activate input widget. Simple case.

  3. 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?

  4. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants