Create a luminous border in QSS

How could one create a luminous border around a button when a user hovers above it in PyQT4 QSS? I'm talking about something similar box-shadowin CSS.

someButton:hover {
    border:1px solid black;
    /*Glowing code here?*/
}

http://0.tqn.com/d/webdesign/1/5/m/l/1/glow-effect.png

+4
source share
1 answer

One way to do this is to use setGraphicsEffect with QGraphicsDropShadowEffect :

    effect = QtGui.QGraphicsDropShadowEffect(button)
    effect.setOffset(0, 0)
    effect.setBlurRadius(20)
    button.setGraphicsEffect(effect)
+5
source

All Articles