System tray icon not visible when statically linked



  • Hi all

    System: Ubuntu 12.04 Unity/Gnome 3

    I compiled Qt 4.8.2/4.8.3 statically and ran qtdemo/desktop/systemtray, found nothing was drawn on task bar. If I click on the area where the tray icon should be, the context menu does appear.

    If I use the qt downloaded from synaptic, it works well.

    My configurations are:

    ./configure -debug-and-release -static -fast -exceptions -no-accessibility -stl -no-qt3support -no-openvg -platform linux-g++-32 -qt-zlib -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -no-webkit -no-multimedia -script -fontconfig -graphicssystem raster

    Please give me some hint... Iit has made me crazy... Thank you.



  • BTW, I installed and uninstalled sni-qt, it does not affect anything.



  • one more thing: the bubble/balloon was displayed in old style (as under windows: http://doc.qt.digia.com/4.7-snapshot/images/system-tray.png ) in my statically linked version

    but the dynamically linked version displays it normally. as other notifications under gnome.

    any ideas?

    Thanks!


  • Moderators

    You might want to check which patches ubuntu applies on top of Qt to build their version. I expect ubuntu to ship Qt with some patches to integrate Qt apps into their desktop environment. Applying those patches of course might break your application on other linux environments when doing static linking.

    Is doing a proper debian package an option for deployment of your application? Then you won't need to statically link at all and could rely on the Qt shipped by the distribution to do the right thing.

    PS: Did you check the license of Qt? Static linking and LGPL is tricky...



  • Thanks, I think it is a good choice to distribute with dynamically linkage.

    I partially solved the problem... I didn't install some x11-libs-dev before compile Qt. Now I can get the icon displayed, but the bubble is still in old style...

    Anyway, I will not use static linking version of Qt... So forget it...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.