Put the QLabel in a layout applied to the MainWindow container widget.
Set the QLabel's scaledContent property.
Put the QLabel in a layout applied to the MainWindow container widget.
Set the QLabel's scaledContent property.
Hi, thanks for answering,
I tried your solution, but it didn't work for me, the scaledContent property only resizes the photo when I set the Pixmap into the QLabel, but I do that manually, so I think it is not needed here. As I said, what I want is the QLabel resizing with the App window. I don't know if I'm explaining well what I mean.
When I try, for example, a vertical layout, my QLabel expands automatically, and I don't want that, I want it in a specific side.
Regards.
Last edited by alexrn; 25th March 2016 at 15:40.
As I said, what I want is the QLabel resizing with the App windowSo you want the QLabel to simultaneously resize with the containing window and not resize with the containing window? Perhaps you can see the potential for confusion.When I try, for example, a vertical layout, my QLabel expands automatically, and I don't want that, I want it in a specific side.
Put the QLabel in a QGridLayout with some spacers or other widgets in the other cells and set the stretch factors.
Last edited by ChrisW67; 25th March 2016 at 21:47.
Bookmarks