Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to establish connection from QtSystemTrayIcon menu items to QML

How to establish connection from QtSystemTrayIcon menu items to QML

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    av2306
    wrote on last edited by
    #1

    Hi all,

    Desktop GUI application implemented in QML. But system tray implemented with QtSystemTrayIcon. How to launch QML form from tray menu item?

    Thanks

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      How do you launch the QML file currently ?

      157

      1 Reply Last reply
      0
      • A Offline
        A Offline
        av2306
        wrote on last edited by
        #3

        main.qml launches from main.cpp :

        QApplication app(argc, argv);
        QQmlApplicationEngine engine;
        engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
        

        How to launch qml scene from tray menu item(QSystemTaryIcon's menu item).

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          The only way I could think of is connecting the triggered() signal to a slot where you would then load the QML.

          157

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved