QLabel setPixmap doesnt work
Code:
void theGui
::setImageLabel(QLabel* _label, IplImage
* image
){ _label
->setPixmap
(QPixmap::fromImage(Ipl2QImage
(image
)).
scaled(_label
->size
(),Qt
::KeepAspectRatio));
}
This one works fine..
Code:
_label
->setPixmap
(QPixmap(image
).
scaled(_label
->size
(),Qt
::KeepAspectRatio));
}
This one doesnt work.. no image displayed
Can you please tell me why above one doesnt work, I tried various things like QPixmap::fromImage(QImage(image)) , but still doesnt work...
Thank you very much
Arpit
Re: QLabel setPixmap doesnt work
Are you really sure "image" is a valid path to an image? And what format is the image? Do you have the right image plugins for that?...
Re: QLabel setPixmap doesnt work
"image" is a valid path, also i can load it as IplImage (OpenCV) but cant seem to use it with setPixmap, its JPG file,
Do i need plugins as this is just basic image viewing.. how do i use the plugins, do i just copy qjpeg4.dll to the app dir...
Thanks
Arps
Re: QLabel setPixmap doesnt work
Hi,
first make sure it is really because of the plugin. If so, see http://doc.trolltech.com/4.6/deploym...tml#qt-plugins for the location of the plugins.
Lykurg