QWidget refresh problem qt5.1
-
Hi all,
I use a QDialog as parent widget which load many children ,but when I set some children widget as invisiable, It can't refresh unless I make the QDialog show normal when it's maximum Or show maximum when it is normal.I've tried to updateGeometry of the QDialog or update the layout in the QDialog.But it do nothing eventhough I invoke resizeEvent()? Can someBody help me? this question puzzles me so many days. -
This might help:
@void QWidget::update() [slot]
// Updates the widget unless updates are disabled or the widget is hidden.@
But then again, when the widget is hidden it will NOT be updated.
So update called on the Dialog should do the trick even when child widgets are invisible. -
No, I just hide the children widget,But when I update the parent widget , It seems no use that there is also a trace of the hidden children unless I show the parent widget normal or maximum
-
Hi,
What do you mean with bq. trace of the hidden children
You still see some parts of them? The other widgets do not re-size over them? Maybe a picture to illustrate? -
Sorry that I don't know how to show you a picture.
For example , the parent widgets have 5 children, when I hide the first child, we should only see 4 children in the layout. The question is that when I hide the first, I can see two the fifth child. the first fifth child is enable, and the second fifth child is just a reflection of the fifth child .