"Loading" effect with border's pushbutton
I have a rounded QPushButton with border.
I would like this border to be dual color depending on a value to achieve a loading effect.
For example value 0, all the border is white, nothing is loaded; value 180, the left border is red, the right border is white, half the content has been loaded, 360 (max value) the border is completely red, everything is loaded.
Do you have any idea how to achieve that?
Have you tried to use pushButton.styleSheet
yes of course but it just gives me a border.
Then I need to customize it, I tried with gradient to have 2 colors but it gives strange results when the button is rounded, the gradiant is not calculated correctly :(
I made a few tests with "border-top-color, border-right-width"
etc. but could not find an attractive working solution - especially for rounded borders. I think you should consider to use bitmaps to meet your target.
Thanks for your help ! How would you start to achieve this with bitmaps?
I haven't worked with the .border-image yet, but some information is provided by the Qt Style Sheets Reference and a detailled description is here: "CSS3 Draft Spec":http://www.w3.org/TR/css3-background/#border-image-process
I will have a look at it, thank you very much !