[PySide] how to suppress qwidget's drop shadow under windows?
Frank Rueter | OHUfx
frank at ohufx.com
Fri Jul 11 15:33:18 CEST 2014
Hi Tony,
thanks for that, I will give that a go first thing in the morning (it's
approaching midnight here).
Will share my findings then.
Cheers,
frank
On 11/07/14 11:23 PM, Tony Barbieri wrote:
> Hey Frank,
>
> I'm pretty sure we use the QtCore.Qt.Tool flag rather than the
> QtCore.Qt.Popup flag to deal with removing the shadow. If that
> doesn't work I can look deeper into how we've dealt with this.
>
> Best,
>
>
> On Thu, Jul 10, 2014 at 11:15 PM, Frank Rueter | OHUfx
> <frank at ohufx.com <mailto:frank at ohufx.com>> wrote:
>
> Hi all,
>
> I was given some code that uses a QWidget, makes it completely
> transparent, then adds a custom paintEvent to draw some custom items.
> This is meant or a fancy right click menu. Under OSX it ll looks
> swell,
> but under windows I get the default drop shadow, because of the
> QtCore.Qt.Popup flag.
> e.g.:
> class MyMenu(PySide.QtGui.QWidget):
>
> def __init__(self):
> QtGui.QWidget.__init__(self)
> self.setAttribute(QtCore.Qt.WA_TranslucentBackground, True)
> self.setWindowFlags(QtCore.Qt.Popup |
> QtCore.Qt.FramelessWindowHint)
>
> w = MyMenu()
> w = show()
>
> What is the easiest way to turn off that off (drop shadows for
> transparent widgets just look irritating :-D )? I guess I could
> inherit
> from QMenu instead of QWidget but would expect more work to get it to
> it's current state and am not entirely sure if that would fix the
> issue.
>
> Any ideas?
>
> Cheers,
> frank
>
>
>
>
>
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org <mailto:PySide at qt-project.org>
> http://lists.qt-project.org/mailman/listinfo/pyside
>
>
>
>
> --
> Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140711/f74c0a54/attachment.html>
More information about the PySide
mailing list