[Android-development] QQuickView dialog hidden behind QML ApplicationWindow on Android

info at classintouch.de info at classintouch.de
Thu Aug 18 12:00:34 CEST 2016


Hi,
I have a project without widgets. Opening a QQuickView as a modal dialog 
works fine on Windows.
On Android, though, the QQuickView is hidden behind the main window 
(which is of QML type "ApplicationWindow").
I've tried
     @new QQuickView()@
as well as
     @new QQuickView(controller->engine(),controller->topLevelWindow())@
(topLevelWindow() returns a QQuickWindow, engine() returns a 
QQmlApplicationEngine)

I've also played around with WindowFlags - to no avail.

Any idea on how to bring the QuickView to the front?
-------------------------------------------------------------------------------
More info:

With swapping active Apps around on my phone I can bring the dialog to 
the front, but I have not succeeded to do that programmatically.
This is how I open the Dialog:

@voidAbstractApp::openIncEditView(QStringtitle,QStringinterfaceName,QVariantinterfaceVariant) 


{ m_incEditView=newMyQQuickView();

m_incEditView->setResizeMode(QQuickView::SizeRootObjectToView);

m_incEditView->setWidth(500);

m_incEditView->setHeight(200);

m_incEditView->setModality(Qt::ApplicationModal);

m_incEditView->setFlags(Qt::Dialog);

m_incEditView->setSource(QUrl("qrc:/qml/qml/IncEdit.qml"));

m_incEditView->show();

}@

I init my main window this way (shortened for readability):
@

boolController::initView(){

this->m_component=QSharedPointer<QQmlComponent>(newQQmlComponent(&this->m_engine));

m_component->loadUrl(QUrl(QStringLiteral("qrc:/qml/qml/main.qml")));
         m_topLevel=QSharedPointer<QObject>(m_component->create());
m_window=qobject_cast<QQuickWindow*>(m_topLevel.data());
m_window->showMaximized();
returntrue;

}@


Kind regards,
Sebastian

-- 
http://www.classintouch.de  - Tablet-Software für Lehrer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20160818/3a910231/attachment.html>


More information about the Android-development mailing list