Skip to content
Snippets Groups Projects
Commit 28f2f251 authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

QDS-10772 The app crashes on exit if the quickwindow is created

parent ddeb1b7d
No related branches found
No related tags found
1 merge request!7QDS-10772 The app crashes on exit if the quickwindow is created
......@@ -255,9 +255,11 @@ void DvAndroid::showAppWindow()
}
printLog("Initializing and showing the QML app window");
m_appWindow.reset(QWidget::createWindowContainer(m_quickWindow.data()));
m_appWindow->show();
m_appWindow->raise();
m_quickWindow->setFlags(m_quickWindow->flags() | Qt::WindowStaysOnTopHint);
m_quickWindow->show();
m_quickWindow->raise();
m_quickWindow->requestActivate();
printLog("Final Sizing:");
printLog("-- Main window height: " + QString::number(m_mainWindow.height()));
......@@ -268,11 +270,6 @@ void DvAndroid::showAppWindow()
printLog("-- Quick window pos-x: " + QString::number(m_quickWindow->position().x()));
printLog("-- Quick window pos-y: " + QString::number(m_quickWindow->position().y()));
printLog("-- App window height: " + QString::number(m_appWindow->height()));
printLog("-- App window width: " + QString::number(m_appWindow->width()));
printLog("-- App window pos-x: " + QString::number(m_appWindow->pos().x()));
printLog("-- App window pos-y: " + QString::number(m_appWindow->pos().y()));
printLog("-- Content item height: " + QString::number(contentItem->height()));
printLog("-- Content item width: " + QString::number(contentItem->width()));
printLog("-- Content item scale: " + QString::number(contentItem->scale()));
......
......@@ -45,7 +45,6 @@ public:
private:
// UI components
QWidget m_mainWindow;
QSharedPointer<QWidget> m_appWindow;
QVBoxLayout *m_layout{new QVBoxLayout};
QLabel *m_logo{new QLabel};
QLabel *m_buildInfo{new QLabel};
......
......@@ -42,7 +42,7 @@ public:
virtual bool initialize() = 0;
protected:
QSharedPointer<QQuickWindow> m_quickWindow;
QScopedPointer<QQuickWindow> m_quickWindow;
QQmlEngine m_qmlEngine;
QQmlComponent m_qmlComponent{&m_qmlEngine};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment