Re: How to get box shadows in qlabels?
Souvik Dutta <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <TY2PR0101MB323265FEB19C1B611991440BF2FC0@TY2PR0101MB3232.apcprd01.prod.exchangelabs.com> |
Thank you that was the answer we want. Thank you. On Wed, 11 Mar, 2020, 6:03 am Maurizio Berti, <[email protected]> wrote: > Stylesheet features on Qt are limited, as it only supports a subset of CSS > properties (not unlike the subset of HTML for rich text); as you have > already found out, there's no box-shadow property. They are useful for > specific design purposes, can be very useful for small and easy > modifications to the widget appearance (and some other things, since they > support qproperties), and can be used to do fancy tricks without manual > painting and/or QStyle overrides, but be careful: some widgets (usually > composite widgets, like spinboxes, combo, sliders) require to be fully > implemented in the stylesheet, otherwise they won't work. > > That said, I became curious about the neumorphism topic, and I decided to > give it a try, mostly because I never created a full QGraphicsEffect on my > own. > > I published the answer on StackOverflow, since I believe it could be > useful to others too. > > > https://stackoverflow.com/questions/60626717/can-i-apply-a-neumorphism-effect-to-a-qwidget > > You can see the result in the attached image, while the full description > on how it was implemented is on the link. > > Cheers, > Maurizio > > Il giorno lun 9 mar 2020 alle ore 03:35 Souvik Dutta < > [email protected]> ha scritto: > >> I am trying to get some neumorphism effect in qlabel. I want two box >> shadows for this. Both of them will be in opposite direction, one will be >> white and another will be black. How can I do this, I mean is there an >> inbuilt function. I tried adding box-shadows, box-shadow and boxshadow in >> the style sheet but everytime it says no property called boxshadow. >> _______________________________________________ >> PyQt mailing list [email protected] >> https://www.riverbankcomputing.com/mailman/listinfo/pyqt >> > > > -- > È difficile avere una convinzione precisa quando si parla delle ragioni > del cuore. - "Sostiene Pereira", Antonio Tabucchi > http://www.jidesk.net > _______________________________________________ PyQt mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/pyqt