Auto expanding QLabel
-
Hi folks, today I have a design issue.
I would like to build a QDockWidget containing an image in a QLabel.Now when undocking this QDockWidget, I would like to be able to resize it and have the QLabel take all the space.
Is it possible without reimplementing the resizeEvent of my dock? Just with strings and any value editable through designer?
Thanks a lot! -
Thanks for your help but could you detail your answer a bit?
-
I currently have in my Qdock window
@<--Spacer-->QLabel<--Spacer--->
^
|
Spacer
|
V@ But obviously this is not the right way to do this. -
Right now it has a fixed size.
But I would like to switch to the behavior i mentionned in my first post.
I tried to remove all spacers, set the QLael policy to minimum expanding, and set a base size.
-> aspect ratio is lost
-> when docked it takes too much space.