[PyQt] QWidget.adjustSize
Christian Caron
ccaron at fattoc.com
Sun Aug 30 03:48:33 BST 2009
Hello,
I often find myself doing things like:
self.layout().addWidget(self.widget)
QTimer.singleShot(1, self.adjustSize)
It seems I need to let the event loop finish doing its business before
attempting to adjust the size of the containing widget.
I'm guessing that the child widget aren't yet visible and thus their
sizeHints are getting ignored.
Anyway, is there a cleaner way of achieving the same thing? The
delayed update feels like a kludge to me.
Thanks,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090830/57e6f60c/attachment.html
More information about the PyQt
mailing list