How do I preview what the size of widgets in a window will be after the layout rules are applied, before I actually show() the widget window? It seems all sizes are 100×30 before that initial show() command. How do I go around that?
How do I preview what the size of widgets in a window will be
Share
The
invalidate()worked for me.Notice that if you do the following it would work as asked here (at least it seems to be fine in my code):
This doesn’t show the widget on the screen since you don’t relinquish control back to the queue until the
hide()happens. In between, theinvalidate()computes the correct positions.