Search code examples
qtzoomingscalingqwidgetqframe

Qt Scaling/zooming contents of a QFrame (widgets, etc)


Is there a way in which I can rescale a QFrame and all of its child widgets? The child widgets are all custom widgets of mine and I'm always interacting with them, but I need them all to scale, even their relative coordinate positions


Solution

  • Came across a solution inadvertently while solving a different problem.

    I used the QFrame::grab() function to get the pixmap of the frame and all of its children and repainted said pixmap elsewhere while using the .scale(int x, int y) function on the QPainter.