Qt World Summit: Register Today!

How to Obtain Display* In PySide

  • I am trying to connect a SpacePilot to a PySide application.
    For this I need to communicate my application's Window,
    and Display pointer to another process. Subsequently I
    need to receive X11 events.

    I use x11info's appRootWindow () to get the Window. But
    how to get the Display pointer? The 'see also' sections of
    the manual mention a display() method, but when I try to
    call it on an x11info instance I get an error that display is
    not an attribute for that class.

    I used ctype to get a Display pointer via libX11.XOpenDisplay(None);
    But I then do not subsequently receive X11events into x11FilterEvent
    method. I only receive device button pushes via the regular QEvent mechanism.

    I understand from old threads elsewhere that there might be multiple
    reasons for not seeing X11 events. But my first guess is that the
    X11 events are going to the wrong Display. Therefore the question.

    Thank you for any help.


Log in to reply