How to change pushbutton icon on pressed?
-
Hello, I have a PushButton and I added an icon with no text. now I want to change the icon while the user pressing that button and return to its default after mouse release, how can I achieve that?
i added the icon by using
icon = QIcon()
button.addPixmap(QPixmap("image"))am using PYQT5
-
Hello, I have a PushButton and I added an icon with no text. now I want to change the icon while the user pressing that button and return to its default after mouse release, how can I achieve that?
i added the icon by using
icon = QIcon()
button.addPixmap(QPixmap("image"))am using PYQT5
You can use stylesheet and the
pressed
indicator/subcontrol