I'm trying to create a very simple pentagonal custom button in Qt. I'm using PyQt5, but the concepts and style-sheet code should be the same as C++ anyway.
My current code is this:
Code:
x = button.width() y = button.height()
This almost works great, but unfortunately it ruins the dropshadow effect and the button just ends up looking weird: https://i.stack.imgur.com/tXsgF.png
Removing the border with
Code:
button.setStyleSheet("border-style: none")
doesn't work well because then the button is indistinguishable from the background. What I'm currently using is
Code:
button.setStyleSheet("background-color: darkBlue; border-style: none")
but this makes the button blue (which is not ideal) and it also removes the colour changes when hovering or clicking the button. Ideally, I would like to have
Code:
button.setStyleSheet("border-style: outset")
and keep colour changing functionality you'd expect from a button. However, the above line actually does the same as `border-style: none`, simply removing the border. Is there a way to get an outset border or at least fix the dropshadow effect of the original button?