I have a QLabel (displaying an image) inside a QScrollArea. How do I find out by how much to scale the image to make it fit with no scrollbars? There will also be a zoom slider to adjust it manually.

You can tell me is using QGraphicsView is a better idea, I'm just not familiar with it.