PDA

View Full Version : How to use QMIME Sourse Factory



shamik
20th December 2006, 08:14
hii friends,

can anyone please tell me how to use QMIME Source Factory ? I want to add images to the dialog. Also i want to change those images during runtime by just updating the dialog or the table in which i wish to put the images.

A handy code would be much helpful if anybody is able to provide one.

:)

jacek
20th December 2006, 15:49
Just create QMimeSourceFactory and set paths using QMimeSourceFactory::setFilePath() or add images using QMimeSourceFactory::setImage() or QMimeSourceFactory::setPixmap(). After you have filled the factory with data, you can register it using QMimeSourceFactory::addFactory().

When you want to change the images, either use setPixmap()/setImage()/setFilePath() or unregister the factory using removeFactory() and add a new one (this way you can have two factories and you can change between them).