Anyone using QT3 designer from the Ubuntu "Jaunty Jackalope" repository ("help about" says V 3.3.8b).<br><br>I'm workin' through the tutorials (storing up QT-fu for a personal
project), and I've found that the "colorpicker" example doesn't load toolbar images, even though they show up
fine in the designer itself. The stdout for the program run in terminal mode shows:<br><br>QPixmap::fromMimeSource: Cannot find pixmap "filenew" in the mime source factory<br>QPixmap::fromMimeSource: Cannot find pixmap "fileopen" in the mime source factory<br>
QPixmap::fromMimeSource: Cannot find pixmap "filesave" in the mime source factory<br>QPixmap::fromMimeSource: Cannot find pixmap "editcut" in the mime source factory<br>QPixmap::fromMimeSource: Cannot find pixmap "editcopy" in the mime source factory<br>
QPixmap::fromMimeSource: Cannot find pixmap "editpaste" in the mime source factory<br>QPixmap::fromMimeSource: Cannot find pixmap "searchfind" in the mime source factory<br>QPixmap::fromMimeSource: Cannot find pixmap "tabwidget.png" in the mime source factory<br>
QPixmap::fromMimeSource: Cannot find pixmap "kdeprint_nup1.png" in the mime source factory<br>QPixmap::fromMimeSource: Cannot find pixmap "kdeprint_nup4.png" in the mime source factory<br>QPixmap::fromMimeSource: Cannot find pixmap "k3iconview.png" in the mime source factory<br>
<br>The solution is to add the following lines to the "main.cpp" file, before it instantiates your "colorpicker" object:<br><br> QMimeSourceFactory *myFactory=QMimeSourceFactory::defaultFactory();<br>
myFactory->setFilePath("images");<br><br>This will set the file path properly so that the automagically created QMimeSourceFactory environment object will find the pixmaps it's looking for. I suppose you could put them in your current directory as well, but that seems like a Sin. You can't put these lines into your "colorpicker::init()" function because init() gets run at the end of the automatically generated code in the instantiation function, after the actions have already (theoretically) received their icons. <br>
<br>Google is silent on this matter, so I'm leaving a breadcrumb here for future users.<br><br><br>-- CHS<br><br>