rdelgado
5th September 2014, 16:54
Hello,
I am trying to find some guidance using QScrollArea.
I am following de Image Viewer example, but I am using Designer to make the GUI.
I have a QScrollArea and some buttons.
Inside the QScrollArea I set a Layout, and then i put a QLabel to use as imageLabel.
Then I follow the code in the Image Viewer example and everything works fine. I can display the image, and I can zoom in and out, but my problem is the following:
When I zoom out or in, the QScrollArea seem to keep the layout inside it always the same size as the original image size. So, when I zoom out the image rescales correctly, but the QScrollBars dont update its size, and when I scroll up or down, left or right, I can see white space where the bigger image used to be.
The problem I seem to have is that the layout inside the QScrollArea seems to be keeping its size, event when I set its property to preferred in Designer.
Do you have any idea what can be the problem?
Thank you very much!
P.S.: Excuse my english.
I am trying to find some guidance using QScrollArea.
I am following de Image Viewer example, but I am using Designer to make the GUI.
I have a QScrollArea and some buttons.
Inside the QScrollArea I set a Layout, and then i put a QLabel to use as imageLabel.
Then I follow the code in the Image Viewer example and everything works fine. I can display the image, and I can zoom in and out, but my problem is the following:
When I zoom out or in, the QScrollArea seem to keep the layout inside it always the same size as the original image size. So, when I zoom out the image rescales correctly, but the QScrollBars dont update its size, and when I scroll up or down, left or right, I can see white space where the bigger image used to be.
The problem I seem to have is that the layout inside the QScrollArea seems to be keeping its size, event when I set its property to preferred in Designer.
Do you have any idea what can be the problem?
Thank you very much!
P.S.: Excuse my english.