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

I'm trying to create an system tray application~



  • Em, I'm trying to create a system tray tool, which can allow me to copy & paste math symbols easily...
    But I have problems on hiding the application icon in mac dock.( I mean it should be a simple pop up window when clicking the application icon in the system tray)
    The solution seems simple:
    https://stackoverflow.com/questions/49053792/start-a-qt-tray-process-without-dock-icon-on-mac
    Just add a key-value in Info.plist under mac... But how to make it available when under development in Qt Designer? ( or, the deployment is another process?)

    QMAKE_INFO_PLIST = Info.plist
    
    DISTFILES += \
        README.md \
        Info.plist
    

    These settings in the project file seem does not work.


  • Lifetime Qt Champion

    Hi,

    Does your Info.plist file contain only what was posted on the stack overflow answer ?

    What version of Qt are you using ?
    What version of macOS are you running ?



  • @SGaist

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>NSUIElement</key>
    <string>1</string>
    </dict>
    </plist>
    

    Hi, this is the content of my Info.plist.

    Qt version is: 5.11.2
    And Mac is High Sierra v10.13.6

    Em...Even I manually change the Info.plist in debug version application:

    tail ./build-MathSymbolDict-desktop-Debug/MathSymbolDict.app/Contents/Info.plist 
    	<key>NOTE</key>
    	<string>This file was generated by Qt/QMake.</string>
    	<key>NSPrincipalClass</key>
    	<string>NSApplication</string>
    	<key>NSSupportsAutomaticGraphicsSwitching</key>
    	<true/>
    	<key>NSUIElement</key>
    	<string>1</string>
    

    When the application run, I still can see the icon in the dock...


  • Lifetime Qt Champion

    Can you provide a minimal compilable example that shows that behaviour ?


Log in to reply