[SOLVED] How to load application in minimize mode?



  • Hi everyone!

    My project base on QtQuick 2.3. The code to load app looks like:
    @
    QQmlApplicationEngine engine;
    engine.addImportPath(dir.absolutePath());
    engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
    @

    The main.qml code look like:
    @
    ApplicationWindow {
    id: rootApp
    visible: true
    width: 1024
    height: 700
    minimumWidth: 1024
    minimumHeight: 700

    }
    @

    What I need to set for start my application in minimize mode (minimy to tray icon)?

    Thanks for the help!


  • Moderators

    Hi,

    For simple minimize the following should work:
    @
    ApplicationWindow {
    visibility: "Minimized"
    }
    @

    And to minimize to system tray AFAIK you will need to use QSystemTrayIcon.



  • Thanks! It's works!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.