Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

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
share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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