5

Is there a class or library somewhere that makes it easy to use the new AppIndicator framework from within a Qt application?

It seems strange that I should have to include GTK headers / libraries etc. just to create an indicator in Qt.

Is there a better way?

5

appmenu-qt is about exposing the menubar of Qt/KDE applications so that it appears in Unity panel. It is not about appindicators.

There is no explicit API to use appindicators from a Qt applications now. There should be one for Ubuntu 12.04. Until this is available, the two possible solutions are:

  • Use the QSystemTrayIcon and ensure your users install the sni-qt package (sni-qt transparently turns a QSystemTrayIcon into a StatusNotifierItem|AppIndicator)
  • Use the KStatusNotifierItem class from kdelibs
1

Seems like there is finally a great answer to this:

On Launchpad, there is a package that provides a Qt class for setting a QMenuBar as an AppMenu:

https://launchpad.net/ubuntu/+source/appmenu-qt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.