I'm having the following problem. I build an application on solaris 10 machine add a few images to the GUI and it works fine on the machine I build it on.
When I move my application to a different solaris 10 machine it runs but no images are displayed and I get the following error:
QPixmap::convertFromImage: Cannot convert a
null image
QPixmap::convertFromImage: Cannot convert a null image
To copy to clipboard, switch view to plain text mode
The sample code of one of the images is the following :
QImage logo
(":/images/logo.jpg");
imageLabel
->setBackgroundRole
(QPalette::Base);
imageLabel->setScaledContents(false);
imageLabel
->setPixmap
(QPixmap::fromImage(logo
));
imageLabel->resize(190,78);
QImage logo(":/images/logo.jpg");
QLabel *imageLabel = new QLabel;
imageLabel->setBackgroundRole(QPalette::Base);
imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
imageLabel->setScaledContents(false);
imageLabel->setPixmap(QPixmap::fromImage(logo));
imageLabel->resize(190,78);
To copy to clipboard, switch view to plain text mode
Any help is appreciated. Thanks in advanced.
Bookmarks