Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a glowing border in QSS

How would one go about create a glowing border around a button when a user hovers over it in PyQT4 QSS? I'm speaking of something similar to the 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

like image 766
Joshua Strot Avatar asked Jan 01 '14 06:01

Joshua Strot


1 Answers

One way to do this, would be to use setGraphicsEffect with a QGraphicsDropShadowEffect:

    effect = QtGui.QGraphicsDropShadowEffect(button)
    effect.setOffset(0, 0)
    effect.setBlurRadius(20)
    button.setGraphicsEffect(effect)
like image 166
ekhumoro Avatar answered Nov 04 '22 02:11

ekhumoro