[SOLVED] Icons at the menubar not visible in Ubuntu 11.04 ( Unity ) ...
-
[quote author="Volker" date="1304764811"]Regarding URLs, it's always good practice to check them with the preview button below the text box for the comment.[/quote]Well, I did check that the URL was correct, but not using the preview button. I just assumed (wrongly though, clearly!) that the rendering on the URL would be correct...
[quote author="Leon" date="1304765188"]This is not Unity's style menubar. I meen this -> http://i55.tinypic.com/2e51dvo.jpg[/quote]Ok, I now see what you mean. Well, you should have been a bit more precise, I guess. :) Anyway, like you, my application doesn't work in the way you describe. I imagine that it is something that Qt will have to support as I would expect it to be very specific to Unity.
-
Vlc ( uses Qt ) neither have icons visible.. But Clementine have.. I checked it's source and see:
@ui_->action_clear_playlist->setIcon(IconLoader::Load("edit-clear-list"));@
And at iconLoader.cpp:
@#include <QFile>
#include <QtDebug>QList<int> IconLoader::sizes_;
void IconLoader::Init() {
sizes_.clear();
sizes_ << 22 << 32 << 48;
}QIcon IconLoader::Load(const QString &name) {
QIcon ret;if (name.isEmpty())
return ret;#if QT_VERSION >= 0x040600
// Try to load it from the theme initially
ret = QIcon::fromTheme(name);
if (!ret.isNull())
return ret;
#endif// Otherwise use our fallback theme
const QString path(":/icons/%1x%2/%3.png");
foreach (int size, sizes_) {
QString filename(path.arg(size).arg(size).arg(name));if (QFile::exists(filename)) ret.addFile(filename, QSize(size, size));
}
if (ret.isNull())
qWarning() << "Couldn't load icon" << name;
return ret;
}@But i do not now how can i also implement this to my app...
-
The unity menubar-in-the-panel thing is a DBus service the canonical developers came up with. Seems their integration into Qt does not work properly.
There is a "bug report against Qt Creator in launchpad":https://bugs.launchpad.net/bugs/770367 that its menu is not moved into the panel either. Looks like the dbus magic necessary to move the menu into the panel does not work properly for Creator either.
-
I have not looked into the problem, so I might be wrong. Does this work in a more normal setup (e.g. kubuntu or a traditional gnome desktop)?
Maybe filing a bug report in ubuntu might help. I personally gave up on reporting things to ubuntu, I find launchpad to be just too horrible to use and my reports were rarely acted upon in a timely manner.
Asking on the #kubuntu-devel irc channel on freenode might get you some results, too:)
-
[quote author="lucho2013" date="1377889749"]Hi Leon:
Have you solved the problem?
I can't show the icons on menu. I work on Xubuntu.
If you solved, can you tell me how?[/quote]I am on Ubuntu 13.10 now ( 2 years have passed )
everything seems pretty much working if i change the icon from the qt designer and set an icon from my resource file
what exactly are you doing and the icon is not visible?
-
Hi,
I have the same problem...i searched in forums withouts results. I tried all what you said, I add the icon in the "graphic" menu and also activate the property "iconVisibleInMenu" but the icon doesn't show.
I'm under Qt Creator 3.0.0 Based on Qt 5.2.0 (GCC 4.6.1, 64 bit).
Ubuntu 13.04 64 bit with Gnome.Thanks