Adapt to QQuickWindow graphics backend API changes in Qt6
This commit is contained in:
parent
2a171e5fa8
commit
68a8fa6034
1 changed files with 4 additions and 0 deletions
|
@ -310,7 +310,11 @@ bool Compositor::setupStart()
|
||||||
|
|
||||||
if (!Workspace::self() && m_backend && m_backend->compositingType() == QPainterCompositing) {
|
if (!Workspace::self() && m_backend && m_backend->compositingType() == QPainterCompositing) {
|
||||||
// Force Software QtQuick on first startup with QPainter.
|
// Force Software QtQuick on first startup with QPainter.
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
|
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
|
||||||
|
#else
|
||||||
|
QQuickWindow::setGraphicsApi(QSGRendererInterface::Software);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_EMIT sceneCreated();
|
Q_EMIT sceneCreated();
|
||||||
|
|
Loading…
Reference in a new issue