Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QPainter over Xlib window



  • Suppose i have an XID of a window. How can i wrap QPainter to draw on this window? I need something like cairo_xlib_surface_create(), but Qt-based.



  • Not sure about X Windows, but you can paint on X Pixmaps using QPixmap::fromX11Pixmap(id, QPixmap::ExplicitlyShared) and painting on it.



  • Not sure about X Windows, but you can paint on X Pixmaps using QPixmap::fromX11Pixmap(id,
    QPixmap::ExplicitlyShared) and painting on it.
    Will drawing on it update pixmap on X server side, or will this be a new QPixmap (a copy) when i draw on it?



  • Ah, understood. Didn't notice QPixmap::ExplicitlyShared first. Thanks and sorry for previous message :).


Log in to reply