PDA

View Full Version : QLabel not resize in setPixmap()



xgoan
23rd October 2006, 11:03
Is there a way to not modify the size of QLabel when a QPixmap is loaded in it? And the contents were shrinked

Thanks

munna
23rd October 2006, 11:46
you can use QPixmap::scaled(int height, int width) to resize your pixmap and then set it to the QLabel.

xgoan
23rd October 2006, 11:57
It works, but now the widget dont resize. I want to strecht it with the dialog

jpn
23rd October 2006, 12:21
The label must be inside a layout which you would then set as dialogs layout. In designer, you can select the top level layout for the dialog from the context menu of the dialogs background.