[PyQt] Serious graphics issues with PyQt5 on newer Windows

Milorad Pop-Tosic pop at hiri.com
Wed Sep 27 15:38:41 BST 2017


Hi Luke,


We've had the same problem on Windows and this is how we force using ANGLE on application startup:


        os.environ.setdefault('QT_OPENGL', 'angle')
        os.environ.setdefault('QT_ANGLE_PLATFORM', 'd3d9')


Make sure you put those lines before you import anything form PyQt5. You'll also need to deploy these three files with your app: libEGL.dll, libGLESv2.dll, d3dcompiler47.dll.


Since Qt version 5.5 graphics drivers are chosen dynamically and the code above forces Qt to always use ANGLE.

More info here: http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers

An alternative would be to use OpenGL but fallback to ANGLE for certain graphics cards that are known to be problematic (same link given above).

Regards,
Milorad
________________________________
From: PyQt <pyqt-bounces at riverbankcomputing.com> on behalf of Lukas Erlacher <erlacher at in.tum.de>
Sent: Tuesday, September 26, 2017 4:41:54 AM
To: pyqt at riverbankcomputing.com
Subject: [PyQt] Serious graphics issues with PyQt5 on newer Windows

Hello,

I am working on a project that has users on all kinds of windows and
linux operating systems.

We recently migrated from pyqt4 (and python2) to pyqt5 (and python3.6).

For Windows, the software is built into a redistributable package using
bdist_msi. You can find a build that shows the versions of all
components used here:
https://ci.appveyor.com/project/Sheeo/client/build/2363

A handful of users are now describing some serious issues that appear to
be related to rendering.

Our application uses OpenGL rendering due to the widgets used and for
some users on Windows (mostly Windows 10) this leads to the application
not rendering correctly, with reports like this:

> The tabs are totally non-responsive for me. It looks like the client is frozen, but it actually isn't, it's just not outputting anything. Clicking on the tabs 'Coop missions' or 'Play' results in nothing happening. I can go to the Chat Lobby, but that is non-responsive as long as I stay on the tab.

The issue is probably caused by bad OpenGL support in the users'
graphics drivers and/or bad implementation in Qt.

Is there anything I can do to fix this other than remove all widgets (it
seems QWebEngineView is the culprit) that force OpenGL rendering?

Is there a version of PyQt5 with ANGLE rendering or is it practical to
build one myself?

In the long run, this probably needs to be resolved by Qt or the
graphics vendors fixing their OpenGL code - but for now, I need to keep
my app working for my users.

Thanks in advance for any pointers towards a fix.

Best,
Luke

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170927/b8a12907/attachment.html>


More information about the PyQt mailing list