lib using Image Collection
I've created a custom widget with a Qt Designer plugin using Qt 3.3.2
The custom widget has buttons that contain IconSet images. The images
were added to the .pro file and called in the code using ::fromMimeSource()
Compiling this project gives me a .lib file that I can include in other Qt projects to use my custom widget.
When using this custom widget the images never show up on the buttons. It seems to me that something must be done to get the images to the compiler of the new project that links in the .lib custom widget file.
Any suggestions?
Re: lib using Image Collection
How do you create the image collection?
Re: lib using Image Collection
In the .pro file I've added the line:
IMAGES = image1.png
Then in the .cpp file:
IconSet ico(QPixmap::fromMimeSource("image1.png"));
Re: lib using Image Collection
Maybe you should use IMAGES += xxx.png instead?
Re: lib using Image Collection
It's a static instantiation problem that can happen when you have an image collection in a library. You must use the qInitImages_xxx() function to make sure the images get created:
http://lists.trolltech.com/qt-intere...ad00291-0.html