I dragged the scroll pane into the constructor, then I dragged the label (imageLabel, for setPixmap). Then I right-clicked and set the layout to be a grid.
scrollArea = new QS..... scrollAreaWidgetContents = new QWidget(); gridlayout = new QGri..(scrollAreaWidgetContents); imageLabel = new QLabel(scrollAreaWidgetContents); gridLayout->addWidget(imageLabel,.....); scrollArea->setWidget(scrollAreaWidgetContents);
So, the developer created the code above, several parts remain, and now I have ui-> imageLabel-> setPixmap in my code set and am trying to do ui-> imageLabel-> resize (200,200). But the image is always at full size 1600x1400 pixels).
Code examples around the network, it seems like they set imageLabel directly to scrollArea and omit scrollAreaWidgetContents? But I, it seems, did not get this from the designer?
source share