[Cmake] cmake and qt -- button icons not included

Filipe Sousa filipe . gr . sousa at alunos . ipb . pt
Sun, 17 Aug 2003 23:58:54 +0100


On Tuesday 12 August 2003 20:37, Josh Snyder wrote:
> Hi,
>
> I'm using cmake with the QT_WRAP commands to compile my Qt code.
> However, this fails to incorporate the button icons found in the images
> directory of the Qt project. qmake will set it up so that uic processes
> these in some way to create a qmake_image_collection.cpp file which is
> then built with the rest of the project. The QT_WRAP commands in cmake
> does not do this. Does anybody have a solution? Thanks,
>
> Josh
>
> _______________________________________________
> Cmake mailing list
> Cmake at www . cmake . org
> http://www . cmake . org/mailman/listinfo/cmake

Hi,
You must tell the buttons to use a function to get the pixmap. On the form 
that have the button go to "Form Settings" and choose "Use Function" and type 
QPixmap::fromMimeSource. Now you can choose "iconSet" on Property Editor a 
enter the pixmap file name (eg. "open.png").

You must create an image collection with uic just like this: uic -embed 
my_collection -o image_collection.cpp path_to_my_images/*

The image_collection.cpp must be added to your cmake project.