Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt5 System Tray Icon with QtQuick 2
Forum Updated to NodeBB v4.3 + New Features

Qt5 System Tray Icon with QtQuick 2

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 5.4k 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.
  • I Offline
    I Offline
    Itehnological
    wrote on last edited by
    #1

    I am trying to add a system tray icon to my QtQuick 2 application. I found these two classes in the "docs":http://qt-project.org/doc/qt-5.0/qtdoc/classes.html:
    QSystemTrayIcon and QPlatformSystemTrayIcon.

    When using the first QSystemTrayIcon class with the QtQuick2ApplicationViewer a second window is displayed by the QSystemTrayIcon class. I guess that it's caused by the fact that the first class is a QWidget based class and the second isn't.

    Then I decided that I can use the QPlatformSystemTrayIcon which doesn't seem to inherit QWidget, but unfortunately when I try to include it "as described in the docs":http://qt-project.org/doc/qt-5.0/qtgui/qplatformsystemtrayicon.html I get an error message, that the class doesn't exist.

    How am I supposed to include the QPlatformSystemTrayIcon class or is there an alternative for a system tray icon?

    P.S. I don't believe that it has to do with the problem, but I am running Qt5 Final Release on Ubuntu 12.04 x86

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Milovidov
      wrote on last edited by
      #2

      What about QSystemTrayIcon in Qt5.0.0? How do i can accept QSystemTrayIcon with Qt Qucik 2.0 application?

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        If you check out newest Qt5 code from git or wait for Qt 5.1.0, it will be possible to embed QML apps (QWindows) into QtWidgets. That would probably help you solve this problem.

        (Z(:^

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Milovidov
          wrote on last edited by
          #4

          Yes, i have Qt5 from Git. But didn't see how i can insert QWidnow into QWidget.

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            Take a look at this "Qt bug":https://bugreports.qt-project.org/browse/QTBUG-25643. It's probably not in the Qt5-git yet, you need to check out master branches (or whatever they are now called. I think it's either dev or stable nowadays).

            (Z(:^

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Milovidov
              wrote on last edited by
              #6

              Ok, i understand, thank you!

              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