True, I missed that there is a file attachment under the image. Sorry.

In your code I can't figure out, where you set the X window in your TopLevel (QMainWindow) object (in a layout or similar). Also I can't see where you use QX11EmbedWidget.