Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED]box-shadow in stylesheet
I wonder how can I view the shadow by stylesheet?
I tried the but it didn't work!
@box-shadow: 0px 5px 5px 0px rgb(0, 170, 0);@
shadabk92 last edited by
I believe this is what you are looking for.If not,please do post back.
Have a look at this link
bq. I believe this is what you are looking for.
Any idea guys?! I couldn't see any mentioning to box-shadow in StyleSheets reference
New up since last August
Do you want it on a webpage using webkit or via qss on a widget?
qss is a subset of css and does not support box shadow. Some simple cases can be "emulated" to an extent with some clever border gradients or a parent container with a padding and background gradient.
[quote]Do you want it on a webpage using webkit or via qss on a widget?[/quote]
Bump it; Shadow effect is needed feature in modern GUI
As I said - qss doesn't support it and most likely will not as there are no (that I know of) new features added to the widgets module.
For now you can get shadows with border images or gradients or by using "QGraphicsDropShadowEffect":http://qt-project.org/doc/qt-5.1/qtwidgets/qgraphicsdropshadoweffect.html with "setGraphicsEffect":http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#setGraphicsEffect
This is what it looks like (can be tweaked of course):!http://img823.imageshack.us/img823/5773/aswn.jpg(shadow examples)!
Thanks a lot.
I'm really confused these days because I touch that Qt gurus (including Digia staff) push us to Qt Quick by stopping adding new features to Qt Widgets. I'm not confidence in Qt Quick although of its fancy features because of Digia policy (commercial plugins of QML) so I may leave Qt to another toolkit which may offers cross-platform flexibility (including web interface).
Any way, this post isn't the right place so I’ve to stop here. Once again thank you Chris.