[Interest] Prevent widget visibility change from triggering parent re-layout

sivan nanthiran nanthiran2005 at gmail.com
Mon Apr 7 11:23:29 CEST 2025


Hi everyone,

I am trying to show/hide child widgets from the resizeEvent of the parent
widget, depending on the available size of the parent widget. However, this
will/may cause another resize event on the parent widget since
QWidgetPrivate::setVisible on the child widget will call
parent->d_func()->layout->activate() which may update the parents size as
the size hint changes.

Is there any way to prevent this from happening?

Regards,
Sivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20250407/ed9aaf9a/attachment.htm>


More information about the Interest mailing list