PDA

View Full Version : Image on QLabel and resizeEvent



^NyAw^
10th September 2008, 16:49
Hi,

I'm displaying an image on a QLabel. When I resize the mainWindow, the QLabel is not resized so I can't resize the image that is shown in it.

Thanks,

jpn
10th September 2008, 17:38
Provide more information, please. Are you using layouts? Have you noticed QLabel::scaledContents?

^NyAw^
12th September 2008, 10:32
Hi,

Yes, I'm using layouts. On "resizeEvent" I take the QLabel width and height and I create a QImage scaled with this width and height because the images are very big and I want to show the full image in the avaiable space of the QLabel.

Thanks,