[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] How to get box shadows in qlabels?
From:       Souvik Dutta <souvik.viksou () outlook ! com>
Date:       2020-03-11 0:59:45
Message-ID: TY2PR0101MB323265FEB19C1B611991440BF2FC0 () TY2PR0101MB3232 ! apcprd01 ! prod ! exchangelabs ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thank you that was the answer we want. Thank you.

On Wed, 11 Mar, 2020, 6:03 am Maurizio Berti, <maurizio.berti@gmail.com>
wrote:

> Stylesheet features on Qt are limited, as it only supports a subset of CS=
S
> 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 m=
y
> 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-ef=
fect-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 <
> souvik.viksou@outlook.com> 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 b=
e
>> 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 i=
n
>> the style sheet but everytime it says no property called boxshadow.
>> _______________________________________________
>> PyQt mailing list    PyQt@riverbankcomputing.com
>> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>
>
> --
> =C3=88 difficile avere una convinzione precisa quando si parla delle ragi=
oni
> del cuore. - "Sostiene Pereira", Antonio Tabucchi
> http://www.jidesk.net
>

[Attachment #5 (text/html)]

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div \
dir="auto">Thank you that was the answer we want. Thank you.</div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 11 Mar, 2020, 6:03 am \
Maurizio Berti, &lt;<a \
href="mailto:maurizio.berti@gmail.com">maurizio.berti@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div \
dir="ltr"><div dir="ltr"><div dir="ltr">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.</div><div dir="ltr"></div></div><div dir="ltr"><br></div><div dir="ltr">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.</div><div \
dir="ltr"><br></div><div dir="ltr"><div>I published the answer on StackOverflow, \
since I believe it could be useful to others too.</div><div><br></div><div><a \
href="https://stackoverflow.com/questions/60626717/can-i-apply-a-neumorphism-effect-to-a-qwidget" \
target="_blank" rel="noreferrer">https://stackoverflow.com/questions/60626717/can-i-apply-a-neumorphism-effect-to-a-qwidget</a><br></div><div><br></div><div>You \
can see the result in the attached image, while the full description on how it was \
implemented is on the \
link.</div><div><br></div><div>Cheers,</div><div>Maurizio</div></div></div></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 9 mar 2020 alle \
ore 03:35 Souvik Dutta &lt;<a href="mailto:souvik.viksou@outlook.com" target="_blank" \
rel="noreferrer">souvik.viksou@outlook.com</a>&gt; ha scritto:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="auto">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.</div> _______________________________________________<br>
PyQt mailing list&nbsp; &nbsp; <a href="mailto:PyQt@riverbankcomputing.com" \
target="_blank" rel="noreferrer">PyQt@riverbankcomputing.com</a><br> <a \
href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer \
noreferrer" target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
 </blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">È difficile \
avere una convinzione precisa quando si parla delle ragioni del cuore. - \
&quot;Sostiene Pereira&quot;, Antonio Tabucchi<br><a href="http://www.jidesk.net" \
target="_blank" rel="noreferrer">http://www.jidesk.net</a></div> </blockquote></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic