Hi,
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").
This leaves the app appear like frozen (the hidden dialog is modal).
With swapping around between active Apps on my phone I can eventually
bring the dialog to the front somehow, but I have not succeeded to do
that programmatically.
I have a project without widgets.So I think,
https://bugreports.qt.io/browse/QTBUG-39454 doesn't apply, right?
I've tried
@new QQuickView()@
as well as
@new QQuickView(controller->engine(),controller->topLevelWindow())@
I've also played around with WindowFlags - to no avail.
Any idea on how to bring the QuickView to the front?
-------------------------------------------------------------------------------
This is how I open the Dialog:
@
voidAbstractApp::openIncEditView(QStringtitle,QStringinterfaceName,QVariantinterfaceVariant)
{
m_incEditView=newMyQQuickView();
// m_incEditView = new
MyQQuickView(controller->engine(),controller->topLevelWindow());
//doesn't help
// (topLevelWindow() returns QQuickWindow, engine() returns the
QQmlApplicationEngine)
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;
} @
Any ideas? I've already sent this question to [Android-development], but
without response.
Kind regards,
Sebastian
--
http://www.classintouch.de - Tablet-Software für Lehrer
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest