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

make non-button widget clickable #369

Open
K3nn3th2 opened this issue Sep 6, 2019 · 2 comments
Open

make non-button widget clickable #369

K3nn3th2 opened this issue Sep 6, 2019 · 2 comments

Comments

@K3nn3th2
Copy link

K3nn3th2 commented Sep 6, 2019

how can i handle clicks on non-button widgets? do i need to subclass PushButton for this?
in qt it seems to be rather easy, am i missing something here?

@sccolbert
Copy link
Member

We haven't enabled generic mouse handling on all widgets. This was done primarily to save people from writing spaghetti code applications.

You can use a RawWidget and work with the Qt widget directly.

Alternatively, I would consider a PR which adds a click "feature" to the base Widget class, in the same manner we have focus and drag features.

@K3nn3th2
Copy link
Author

K3nn3th2 commented Sep 6, 2019

imo the click feature would be great.
very useful for selectable list items, highlighting etc..

for now i just added a checkbox, does the trick as well and is less hassle than adding a new class

(i must say i am still a bit confused about double declaring python and enaml classes because enaml classes can only sublcass one class)

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