<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>I often find myself doing things like:</div><div><br></div><div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">self.layout().addWidget(self.widget)</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">QTimer.singleShot(1, self.adjustSize) </span></font> </div><div><br></div><div>It seems I need to let the event loop finish doing its business before attempting to adjust the size of the containing widget.</div><div>I'm guessing that the child widget aren't yet visible and thus their sizeHints are getting ignored.</div><div><br></div><div>Anyway, is there a cleaner way of achieving the same thing? The delayed update feels like a kludge to me.</div><div><br></div><div>Thanks,</div><div>Christian</div></div></body></html>