Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QML SystemTrayIcon application name



  • 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



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


Log in to reply