Hi,
I want to add an image to QPushButton for "normal" state and an image for "pressed" state by using StyleSheets. The issue I am having is that transparency of the image doesn't seem to work well, I see the square shape of the icon even though the icon is completely transparent.
Does anyone have a an idea why this is happening ?
Here is my stylesheet code and a screenshot of the QPushButton. You can see the square with slightly different color than the background, almost as if it's partially transparent.
Qt Code:
QPushButton#settingsButton { image: url(transparent_icon.png); border:none; outline:none; width: 64px; height: 64px; } QPushButton#settingsButton:pressed { image: url(transparent_icon.png); }To copy to clipboard, switch view to plain text mode
Bookmarks