Qt Layout problem
-
Hi all!
I have a grid layout with cards like the one below.
!http://i.imgur.com/7kbsd.png(Qt Layout problem)!
The cards are implemented as QLabel with a fixed size policy and min and max size specified. The problem is when I click on the 10 of Hearts to play it (and moving it away from that layout), the other two cards are organized to take the whole space leaving an equal margin on their right. I'd like to have these two other cards to stick on their own positions.
Now there are workarounds. Like I could inject the QPixmap on some empty QLabels but I'd really like to have it working by having the cards stay put on their original position and not aligning on the left of the container layout.
I'd appreciate anybody pointers to make this work.
-
Is that the best way there is in Qt? That's the real question.
Otherwise I could even remove them from the grid layout and place them on the main window at fixed positions. I like working with the layouts as I can addWidget and removeWidget.
-
Hi Gerolf,
could you explain what exactly you mean by custom positioning?
Thanks