Custom QCheckbox does not appear when the program runs
-
I want to change the default blue color of the checkboxes. I added a png to the resorces and then add it in the checkbox stylesheet. In QtDesigner I see it but when the program run it's not there.
In QtDesigner:
When the program runs:
Configuration:
Styles in the QCheckbox:
Anyone knows why this is happening? Or how to see what is happening? The console is not giving me any errors
-
Hi,
Just a wild guess but I am not sure that the @ notation is supported. Try with a normal file name.
-
I rename the file but still got the same result
-
I just realized, in the examples, there are no single quotes around the url.
-
Yeah, I tried both ways and I get the same result. Don't know whats the correct way tho
-
Then I would test loading that image in QLabel to see it loads properly there.
-
This post is deleted!
-
I think it has something to do with the way my program works. I add the
.png
images in another folder and add it in the stylesheet with a relative path and it works. I also had to add the unchecked and disable png -
Are you sure that your resources are properly built ?
-
You can try to add a style sheet with code.
1/10