PDA

View Full Version : Image Viewer



sumsin
14th March 2006, 13:41
Hi

I am developing an Image-Viewer through one can only see the images of any format like ( png, jpg, xpm, bmp etc )

I want to show the required image in the central area of QMainWindow, but the central widget must be of type QWidget.

So I created the central Widget inherited from QWidget and QPixmap....( i m not sure that I should do this ) but its not working.

plz guide me

thanks & regards
sumsin

wysota
14th March 2006, 13:44
Try QLabel :)

sumsin
14th March 2006, 14:22
thanks.

Its working, but is it the right choise...:confused:

jpn
14th March 2006, 14:29
QLabel is inteded for displaying text or an image.
No user interaction functionality is provided, though. So as long as you're only displaying the image, it's fine and even no subclassing is needed.