@herocon
Ok next attempt:
ui->label->setPixmap(p.scaled(ui->label->size()));Each iteration scales the pixmap to current label size and then sets the pixmap to the label.
By doing this, the size of the label increases with the pixmap (because of border/frame... IIRC 1px per side by default, so 2px in total).
Then you take the new label size again in the next iteration and apply this new (by 2px) increased size to the pixmap... the label gets the pixmap, grows by about 2px in height and there you have your loop where your label and consequently the whole widget grows ;-)
So still no bug :)
And it's exactly the behavior you would expect from the debug output.
(The height increases by 2 each timer interval).
When using another layout setup, the layout/other widgets might "buffer" that, so the main app window does not grow.
But even there, the label itself should definitely grow when you periodically set content which has the exact same size as the outter boundings of the label.
Why though?!
Try (not tested):
int w = ui->label->width(); int h = ui->label->height(); ui->label->setPixmap(p.scaled(w - 2, h - 2)); // or this and set the pixmap only once ui->label->setScaledContents(true);Because a label with w=500, h=500 for example, can't display a pixmap with w=500, h=500. If you set a pixmap with the same size as the label itself, it will start to grow.