PDA

View Full Version : call function after QGridLayout (and its content) has been sized



szisziszilvi
6th November 2011, 15:27
Hi,

I have a small application in that I have a QGridLayout on MainWindow, in which I placed some QLabels. I would like to show an image in some QLabels by default so that I need the final size of them. If I try to set the images in the QMainWindow's constructor (or by a function call placed there) the images are shown small because I set them to the size of the QLabels which are not in their final size at the point when I set their pixmaps (QLabel::setPixmap()). The solution should be waiting for QLabels to get teir final state before setPixmap, but I can not find its way. Now how should I solve this?

Szilvi