Re: Drawing on desktop (root window) under X11
David Boddie <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <5754217.Tm5by9P6nG@aurora> |
On Mon Jul 22 02:29:37 BST 2019, Maurizio Berti wrote: > The Qt documentation ( https://doc.qt.io/qt-5/qapplication.html#desktop ) > says this about QDesktopWidget: > > On X11, it is also possible to draw on the desktop. I remember this! :-) > However, I've not been able to understand how this can be done. > I found a very old C++ example ( > https://doc.qt.io/archives/3.3/desktop-example.html ) but I couldn't port > it. > Installing an eventFilter on the returned QDesktopWidget won't get any > QPaintEvent (only PolishRequest and Polish events), and subclassing > QApplication to return a subclassed QDesktopWidget won't do anything too. > > Does anybody know anything about this? The documentation about drawing on the desktop is very old - from Qt 3, if not earlier. I remember trying to draw on the desktop with Qt 4 (and maybe even Qt 3) using similar techniques but didn't manage to make it work. I would be very surprised if any modern desktop would allow this to be done. Plus, the painting model changed in Qt 4 to disallow (or deprecate) painting on widgets from outside of paint event handlers, so some of the tricks used in the old Qt 3 example won't work now. David _______________________________________________ PyQt mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/pyqt