Jimbot
30th August 2014, 22:34
Hello,
I'm having trouble using labels and groupboxes when resizing my main window.
I am trying to make a card game which has the following layout ---> 10601
Because I need some cards to overlap I positioned them within groupboxes and then added the groupboxes to layouts. The window is made up of 3 horizontal layouts (top, middle, and bottom rows) which are then added to one vertical layout (which is set as the window layout).
This is works fine when the window is maximized, but when I resize the window, my card images do not scale with the window ----> 10602
I have subclassed my labels so that they scale images when their resizeEvent is triggered which works fine on its own (ie outside of a groupbox), but when the labels are inside a groupbox, the labels resizeEvents are never called, despite the groupbox resizeEvents being triggered.
How can I correct this? Is there a way of making my labels inside a groupbox detect when the groupbox is being resized? Or should I be approaching the overall layout problem differently?
Thanks for any guidance,
Jimbot
I'm having trouble using labels and groupboxes when resizing my main window.
I am trying to make a card game which has the following layout ---> 10601
Because I need some cards to overlap I positioned them within groupboxes and then added the groupboxes to layouts. The window is made up of 3 horizontal layouts (top, middle, and bottom rows) which are then added to one vertical layout (which is set as the window layout).
This is works fine when the window is maximized, but when I resize the window, my card images do not scale with the window ----> 10602
I have subclassed my labels so that they scale images when their resizeEvent is triggered which works fine on its own (ie outside of a groupbox), but when the labels are inside a groupbox, the labels resizeEvents are never called, despite the groupbox resizeEvents being triggered.
How can I correct this? Is there a way of making my labels inside a groupbox detect when the groupbox is being resized? Or should I be approaching the overall layout problem differently?
Thanks for any guidance,
Jimbot