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

ModelObjectWidget changed keyboard and focus behaviour. #781

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

RockFordgt
Copy link

Switching focus form filter edit to tree/table by pressing arrows up/down key.
Added event filter for tree/table and widget, printed symbols + backspace update filter edit.

Switching focus form filter edit to tree/table by pressing arrows up/down
Added event filter for tree/table, printed symbols + backspace update filter edit.
@rkhaotix
Copy link
Member

It makes me happy ti see people sending their pull requests! Thanks :)

First, I liked the idea of switching between controls using arrows. But the tab switching isn't enough?

Second, as I could understand (don't tested the code yet) the event filter also update the name filter as the user press any printable key, right? If this is it... I'm afraid that this behavior may cause user confusion or even make him annoyed in case of pressing a key by mistake and changing his original filtering.

Finally, once I merge the pull request do you mind if I do some code formatting to make it in the standard I use? :)

Anyway thank you so much for your work.

@RockFordgt
Copy link
Author

Hi,
IMO tabs are not enough, with tabs you have to jump in some order, with current order tab jumps to check box, with arrows focus jumps to tree/table and also selects (setCurrentItem) the first matching object.
second Yes, eventFilter and keyPressEvent both pass QKeyEvent to "name filter", this behaviour have one advantage, user can adjust what is filtered even if focus is set to tree/table widget. as I've tested it occurred that this should also happen if focus is somewhere else in the parent widget (not the buttons)
this makes behaviour more predictable and easier to accept.
just test if you will like it ;-)

about code formatting: I usually try to use KDE code formatting guidelines it looks like the one of the best "on the market", do you have any link to your code guidelines, I'll may update it and then prepare new patch set.

Do you have any mail discussion group, or irc channel, or you are using only github facilities?

@rkhaotix
Copy link
Member

Well, I'll test the code later and see how it works. Maybe we can make this improvement be toggled in settings. Honestly, I don't like to use arrow keys to change focus but it can be useful for other users the same is valid for the new behavior for filtering.

About code formatting, I don't use a common convention I just format the code the way I find it easy to read. Anyway this is a small detail and can be discussed later.. :)

Finally, for practical reasons I use only GitHub's facilities to communicate with users. If you prefer you can contact me via email.

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

Successfully merging this pull request may close these issues.

None yet

2 participants