PDA

View Full Version : Adding full dropshadow to QWidget



jburnette
28th May 2010, 16:35
I have been playing around with graphics effects and would like to have a dropshadow that completely circles my widget. I've played with QGraphicsDropShadowEffect but that only seems to allow having a shadow off one edge of the widget. I would like the effect to continue around all sides.

I have tried subclassing QGraphicsDropShadowEffect and reimplementing the draw function but haven't been able to get something that looks right. I've tried to basically draw 4 lines around the perimeter of the widget where each line has a linear gradient to create the effect. Like I said, doesn't look quite right.

Is this the right way to go about this? Anyone out there tackle this before. I'd be surprised if I were the only one. Just haven't found anything in the forum.

Thanks for your help,

John