QLabel showing an image inside a QScrollArea
I've successfully implemented a Image Viewer (for DICOM) in Qt. I can see the image and I can zoom in and out correctly. Now, I want to see scroll bars if the image is too big to show when I zoom in. I've used the UI. I placed a QScrollArea . Inside, the QLabel . The verticalScrollBarPolicy is ScrollBarAsNeeded . The horizontalScrollBarPolicy is ScrollBarAsNeeded . The problem is: it doesn't work. I zoom in, but no scrollbar appears. Second try: using a layout inside the QScrollArea. So now there's a QWidget between the QScrollArea and the QLabel: a horizontal layout. Opened the same image,