mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
QML UI: make the QML window object part of the QMLManager class
This way we can access it from that code (which we'll need to invoke methods in QML code from C++). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
16e91177bb
commit
8d01d421d4
2 changed files with 2 additions and 0 deletions
|
@ -136,6 +136,7 @@ public:
|
|||
QStringList cylinderInit() const;
|
||||
Q_INVOKABLE void setStatusbarColor(QColor color);
|
||||
void btHostModeChange(QBluetoothLocalDevice::HostMode state);
|
||||
QObject *qmlWindow;
|
||||
|
||||
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
|
||||
void writeToAppLogFile(QString logText);
|
||||
|
|
|
@ -130,6 +130,7 @@ void run_ui()
|
|||
|
||||
manager->setDevicePixelRatio(qml_window->devicePixelRatio(), qml_window->screen());
|
||||
manager->dlSortModel = sortModel;
|
||||
manager->qmlWindow = qqWindowObject;
|
||||
manager->screenChanged(screen);
|
||||
qDebug() << "qqwindow screen has ldpi/pdpi" << screen->logicalDotsPerInch() << screen->physicalDotsPerInch();
|
||||
#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
|
||||
|
|
Loading…
Reference in a new issue