Build QAxWidget specific stuff only on Windows

This commit is contained in:
Uwe Kindler 2020-01-11 12:05:44 +01:00
parent 616e50c3f5
commit 5cf4aa77d8
2 changed files with 13 additions and 1 deletions

View File

@ -53,7 +53,10 @@
#include <QRubberBand>
#include <QPlainTextEdit>
#include <QTableWidget>
#ifdef Q_OS_WIN
#include <QAxWidget>
#endif
#include <QMap>
#include <QElapsedTimer>
@ -201,6 +204,7 @@ static ads::CDockWidget* createTableWidget(QMenu* ViewMenu)
}
#ifdef Q_OS_WIN
//============================================================================
static ads::CDockWidget* createActiveXWidget(QMenu* ViewMenu, QWidget* parent = nullptr)
{
@ -211,6 +215,7 @@ static ads::CDockWidget* createActiveXWidget(QMenu* ViewMenu, QWidget* parent =
ViewMenu->addAction(DockWidget->toggleViewAction());
return DockWidget;
}
#endif
//============================================================================
@ -298,7 +303,9 @@ void MainWindowPrivate::createContent()
auto Action = ui.menuView->addAction(QString("Set %1 floating").arg(DockWidget->windowTitle()));
DockWidget->connect(Action, SIGNAL(triggered()), SLOT(setFloating()));
#ifdef Q_OS_WIN
DockManager->addDockWidgetFloating(createActiveXWidget(ViewMenu));
#endif
for (auto DockWidget : DockManager->dockWidgetsMap())
{

View File

@ -2,7 +2,12 @@ ADS_OUT_ROOT = $${OUT_PWD}/..
TARGET = AdvancedDockingSystemDemo
DESTDIR = $${ADS_OUT_ROOT}/lib
QT += core gui widgets axcontainer
QT += core gui widgets
win32 {
QT += axcontainer
}
CONFIG += c++14
CONFIG += debug_and_release
DEFINES += QT_DEPRECATED_WARNINGS