mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-03-31 10:22:39 +08:00
Fix weird behavior on demo examples with QQuickWidget and Image Viewer when undocking redocking
This commit is contained in:
parent
4ff92dfd80
commit
d57448bad7
@ -2,6 +2,7 @@
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QApplication>
|
||||
#include <QQuickWindow>
|
||||
#include <QDebug>
|
||||
|
||||
#include <memory>
|
||||
@ -35,6 +36,14 @@ void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// https://doc.qt.io/qt-6/qtdatavisualization-known-issues.html
|
||||
// Use either `qputenv("QSG_RHI_BACKEND", "opengl");` or the following line
|
||||
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
|
||||
|
||||
// Disable warnings when attempts are made to convert non-convertible non-native widgets
|
||||
// to native widgets (such as QQuickWidget)
|
||||
QApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#if QT_VERSION >= 0x050600
|
||||
|
Loading…
Reference in New Issue
Block a user