Skip to content

Commit

Permalink
Merge pull request #1613 from Ledjlale/fix/qt6_opengl
Browse files Browse the repository at this point in the history
(Qt6) Force OpenGL for Qt6/QML.
  • Loading branch information
mcallegari authored Sep 12, 2024
2 parents 5d8b035 + 5106eed commit 606b850
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions qmlui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ void printVersion()
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
// Since Qt6, the default rendering backend is Rhi. QLC doesn't support it yet so OpenGL have to be forced.
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
qputenv("QT3D_RENDERER", "opengl");
#endif

QApplication::setOrganizationName("qlcplus");
QApplication::setOrganizationDomain("org");
Expand Down

0 comments on commit 606b850

Please sign in to comment.