I have a QLabel
in a QScrollArea
. When I set the label's pixmap with the setPixmap
function, the scrollbars appear to cover entire image. But when I try to overload the paintEvnet
function and draw an image with QPainter::drawImage
, scrollbars disappear and for discovering the entire image I have to resize the the program's window. What is the solution?
Asked
Active
Viewed 150 times
0

Daniel Hedberg
- 5,677
- 4
- 36
- 61

Hesam Qodsi
- 1,569
- 3
- 25
- 38
-
3Check if you create a `QPainter` object for `viewport()` widget, not for your `QScrollArea` itself. – hank Apr 18 '13 at 06:35
-
just do QLabel.setMinimumsize(w,h) and QLabel.setMaximumSize(w,h) – Hesam Qodsi Apr 22 '13 at 12:58