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

ENH: Set focus proxy on ctkPathLineEdit #1026

Merged

Conversation

ebrahimebrahim
Copy link
Contributor

The focus proxy is set to the QLineEdit, which is a natural choice.
This way the user of ctkPathLineEdit can set its focus policy and
include in a tabbing order as though it's a single widget, without
thinking about the underlying QWidgets internal to ctkPathLineEdit.

Related discussion: Slicer/Slicer#6184 (comment)

The focus proxy is set to the QLineEdit, which is a natural choice.
This way the user of ctkPathLineEdit can set its focus policy and
include in a tabbing order as though it's a single widget, without
thinking about the underlying QWidgets internal to ctkPathLineEdit.
ebrahimebrahim added a commit to ebrahimebrahim/Slicer that referenced this pull request Feb 21, 2022
After the CTK change introduced in
commontk/CTK#1026 ,
we can get rid of the hacky solution to setting a reasonable
ctkPathLineEdit focus proxy.
Copy link
Member

@lassoan lassoan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this looks good to me.

It seems that this is exactly what the focus proxy is intended for and it is already used in CTK (see 93cffdf).

@lassoan lassoan merged commit 4f87cd0 into commontk:master Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants