0

I have a problem with QPushbutton under Linux Under Windows 10, I've made a couple of buttons like this one:

 self.playbutton = QPushButton("", self)
 self.playbutton.setGeometry(1, 2, 35, 27)
 self.playbutton.setStyleSheet("QPushButton {background-color : rgba(0, 0, 0, 0);"
                               "background-image : url(images/play.png); border: 0px}"
                               "QPushButton::hover {background-image : url(images/play_over.png);}"
                              )
 self.playbutton.clicked.connect(self.play)

The buttons appear correctly under linux but the button which have the focus show a grey border like this:

enter image description here

Can someone help me with this

  • 1
    What if you use `border: none; outline: none;` for the default selector stylesheet? (Please write a comment when you edit a post, otherwise we won't get notified about it) – musicamante Feb 05 '22 at 02:36
  • outline: none; do the job, thank you again – sebastien deepwali Feb 05 '22 at 02:48
  • Please accept the duplicate request based on this post: [QT - CSS: decoration on focus](https://stackoverflow.com/questions/17280056/qt-css-decoration-on-focus) – musicamante Feb 05 '22 at 02:51

0 Answers0