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. QML SystemTrayIcon application name
Forum Updated to NodeBB v4.3 + New Features

QML SystemTrayIcon application name

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 452 Views
  • 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.
  • C Offline
    C Offline
    convexbytes
    wrote on last edited by convexbytes
    #1

    Hi,

    I use SystemTrayIcon to display notifications using showMessage. The notifications are shown on MacOS and Windows 10. My problem is Windows 10, the notifications shows the name of executable file (myapp.exe, image attached), I need to show a custom application name. I tried changing qml window title, using QApplication::setApplicationName, setting icon.name: "My App Name": but none works. Is there a way to do this?

    Using Qt version 5.12.0 in C:/Qt/5.12.0/msvc2017/lib

    Minimal example

    import QtQuick 2.12
    import QtQuick.Window 2.12
    import Qt.labs.platform 1.1
    ApplicationWindow {
    title: "My App Name"
        SystemTrayIcon {
            visible: true
            icon.source: "qrc:/icons/myicon.ico"
            icon.name: "My App Name"
        }
    }
    

    0_1560824753367_InkedsW5BeuSw3l_LI.jpg

    C 1 Reply Last reply
    0
    • C convexbytes

      Hi,

      I use SystemTrayIcon to display notifications using showMessage. The notifications are shown on MacOS and Windows 10. My problem is Windows 10, the notifications shows the name of executable file (myapp.exe, image attached), I need to show a custom application name. I tried changing qml window title, using QApplication::setApplicationName, setting icon.name: "My App Name": but none works. Is there a way to do this?

      Using Qt version 5.12.0 in C:/Qt/5.12.0/msvc2017/lib

      Minimal example

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import Qt.labs.platform 1.1
      ApplicationWindow {
      title: "My App Name"
          SystemTrayIcon {
              visible: true
              icon.source: "qrc:/icons/myicon.ico"
              icon.name: "My App Name"
          }
      }
      

      0_1560824753367_InkedsW5BeuSw3l_LI.jpg

      C Offline
      C Offline
      convexbytes
      wrote on last edited by
      #2

      @convexbytes It turns out I only needed to set the qmake variable QMAKE_TARGET_PRODUCT

      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