Reputation: 765
My code:
from PyQt5 import QtCore, QtWidgets
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebEngineWidgets import QWebEnginePage
print("this code is reached")
app = QApplication(["foo"])
print("this code is not reached")
results in the error:
this code is reached
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Could not initialize GLX
However, if I don't import QWebEnginePage (just uncomment line 3), the code works.
My system: Ubuntu 20.04, RaspberryPi 4B
Upvotes: 1
Views: 1308
Reputation: 765
export QT_XCB_GL_INTEGRATION=none
solves the problem. However I am wondering whether it could be solved without disabling OpenGL. Answer coming from this thread mentioned by Teejay Bruno.
Upvotes: 4
Reputation: 2159
According to this similar error I would see if the recommended answer fixes your issue
sudo apt-get install libgl1-mesa-dri
Upvotes: 1