Qt: How to force a hidden widget to calculate its layout?

前端 未结 6 757
北海茫月
北海茫月 2020-12-09 17:01

What I am trying to do is render a qwidget onto a different window (manually using a QPainter)

I have a QWidget (w) with a layout and a bunch of child controls. w i

6条回答
  •  悲哀的现实
    2020-12-09 17:52

    I had some succes in a similar problem by first calling w->layout()->update() before w->layout()->activate(). That seems to force the activate() to actually do something rather than think it is fine because the window isn't being shown anyway.

提交回复
热议问题