Stylesheet for checkboxes animation
-
Hi,
I checked but couldn't find an answer or perhaps I didn't look in right place, is there a stylesheet setting if a user hovers the mouse pointer over a check box the border color changes and perhaps also the background color of the actual square changes too?
Thanks!
-
-
@leinad Did you actually read my link? There you can see how you can set another style when hover is active...
-
@leinad said in Stylesheet for checkboxes animation:
creates the animation when I create a checkbox?
What does this mean?
-
- Bring up QtCreator
- Create a form
- Add a Checkbox to the form.
- Hover your mouse over the checkbox. You can see the border change color from black to yellow at least in QtCreator.
How does that happen? Does QtCreator have built in stylesheets? Does QtCreater have code to change the border color on hover? I'm curious at how it is done in QtCreator. There is no stylesheet it uses that I am aware of.
-
I don't see anything except a hover effect on the checkbox which can be modified via stylesheets or a QStyle.
-
I don't understand your question. QtCreator is an application made with Qt. So it can use a custom QStyle and stylesheets like any other Qt application.
-
Right, but there are no stylesheets that I can see for QtCreator so the mouse hover affect must be done using QStyle and not stylesheets. If it was using a stylesheet I can use the image it calls in my application rather than reinvent the wheel. That is my question.
-
@leinad said in Stylesheet for checkboxes animation:
I can see for QtCreator
Where do you want to see it? In the code? I wonder what's so hard to implement the hover stylesheet effect I linked in my first post...
-