<div dir="ltr">I recently encountered a very similar problem running PyQt5.4.1 on Ubunut 14.10. First comes a a blizzard of these messages,<br><div><div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> (python:22792): Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion<br>
> `GTK_IS_WIDGET (widget)' failed<br>
<br></blockquote><div><br></div><div> followed by a steady stream of errors from QPainter that continue until the app is killed. In my case, there were graphic artifacts on the screen, a giant menu-bar and comet-trails of pixels if I moved the window.<br><br></div><div>If you search on that message text you will find many people having similar problems. They seem to relate to the use of the GTK, and one way to get rid of them is to make Qt use something else. I put the following code at the start of my app and the problem vanished:<br><br><pre>    args = []
    if sys.platform == 'linux' :
        args = ['','-style','Cleanlooks']
    app = QApplication(args)
</pre>
This tells Qt to use the "Cleanlooks" graphic template. You could also use "Fusion".<br></div></div></div></div></div>