Is a way to don't resize QLabel with QPixmap?
Solved
General and Desktop
-
Hello,
I have QGridLayout with 9 QLabels on it. I would like to have the same 9 cell's sizes in this QGridLayout, so I set:
for(int i=0; i<3;i++) { grid->setColumnStretch(i,1); grid->setRowStretch(i,1); }
Now I would like to add QPixmap to one cell ( for example 0,0 ). When I do this I get one big cell (0,0) with QPixmap and 8 smaller.
What I would like to have:
What I have now:
Of course the rest 8 cells are empty.
When I do the same but with QLabels with no QPixmaps everything is ok.
-
@Bonnie said in Is a way to don't resize QLabel with QPixmap?:
Just set size policy of both directions to Ignored
I have been using Qt widget size policies for a long time now, and I still don't always get how they do/do not work! Maybe I should be using
Ignored
more, which I have never touched...