[Interest] Raise QML window on top

Igor Mironchik igor.mironchik at gmail.com
Sat Jul 21 06:45:44 CEST 2018


Hi,

How can I raise QML window on top? I load window with

QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

I tried following in the main.qml

function raiseWindow() {
         mainWindow.flags &= ~Qt.WindowMinimized
         mainWindow.flags |= Qt.WindowActive
         mainWindow.raise()
         mainWindow.flags |= Qt.WindowStaysOnTopHint
         mainWindow.flags &= ~Qt.WindowStaysOnTopHint
    }

But at least on Linux it doesn't work.

Thank you.




More information about the Interest mailing list