[Qt-interest] Images not showing in QToolBar on Linux
Harri Pasanen
grego at mpaja.com
Thu Jul 7 19:27:15 CEST 2011
Thursday, July 07, 2011 06:54 pm
Michael Jackson writes:
> The System is Ubuntu Desktop 10.10 i386 with Qt 4.7.0. I have a QToolBar on
> my QMainWindow. On OS X and Windows the Icons show up. On Linux they do
> not. I have checked the obvious things like spelling and capitalization
> errors. I have a .png file that I have listed in a .qrc file. I create my
> icon like so:
>
> QIcon GrainGeneratorPlugin::icon()
> {
> return QIcon(":/graingenerator.png");
> }
>
> Here is the .qrc file that goes along with it:
> <!DOCTYPE RCC>
> <RCC version="1.0">
> <qresource>
> <file>graingenerator.png</file>
> </qresource>
> </RCC>
>
> I am not that familiar with Linux issues as OS X and Windows are my main
> development platforms but I definitely need to support my linux customers.
> Hopefully this is just something simple? Or maybe I can not show icons on a
> toolbar in Linux? Any help is very much appreciated.
Probably something simple, I would suspect a build dependency or similar.
How do you build?
Something like
make distclean
qmake && make
might be all you need to do.
Harri
http://mpaja.com/
More information about the Qt-interest-old
mailing list