Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPainter over Xlib window

QPainter over Xlib window

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 1 Offline
    1 Offline
    10110111
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

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

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • 1 Offline
        1 Offline
        10110111
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • 1 Offline
          1 Offline
          10110111
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved