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 is hidden. Until w is shown, there is no layout calculations happening, which is expected.
When I call w->render(painter, w->mapToGlobal(QPoint(0,0))
, I get a bunch of controls all overlapping each other.
w->layout()->activate();w->layout()->update()
doesn't seem to do anything.
Is there a way to force the layout to happen without showing w?