mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Added QQuickWidget to demo application for testing OpenGl QtQuick on Linux
This commit is contained in:
parent
09e4e6fa5a
commit
5a00eece87
@ -62,6 +62,7 @@
|
||||
#include <QPointer>
|
||||
#include <QMap>
|
||||
#include <QElapsedTimer>
|
||||
#include <QQuickWidget>
|
||||
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
@ -407,6 +408,17 @@ struct MainWindowPrivate
|
||||
return DockWidget;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create QQuickWidget for test for OpenGL and QQuick
|
||||
*/
|
||||
ads::CDockWidget *createQQuickWidget()
|
||||
{
|
||||
QQuickWidget *widget = new QQuickWidget();
|
||||
ads::CDockWidget *dockWidget = new ads::CDockWidget("Quick");
|
||||
dockWidget->setWidget(widget);
|
||||
return dockWidget;
|
||||
}
|
||||
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
@ -424,7 +436,6 @@ struct MainWindowPrivate
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
@ -557,6 +568,11 @@ void MainWindowPrivate::createContent()
|
||||
// Create image viewer
|
||||
DockWidget = createImageViewer();
|
||||
DockManager->addDockWidget(ads::LeftDockWidgetArea, DockWidget);
|
||||
|
||||
// Create quick widget
|
||||
DockWidget = createQQuickWidget();
|
||||
DockWidget->setFeature(ads::CDockWidget::DockWidgetClosable, true);
|
||||
DockManager->addDockWidget(ads::LeftDockWidgetArea, DockWidget);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@ ADS_OUT_ROOT = $${OUT_PWD}/..
|
||||
|
||||
TARGET = AdvancedDockingSystemDemo
|
||||
DESTDIR = $${ADS_OUT_ROOT}/lib
|
||||
QT += core gui widgets
|
||||
QT += core gui widgets quick quickwidgets
|
||||
|
||||
include(../ads.pri)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user