PDA

View Full Version : Rezizing the Qlabels vertically



anju123
3rd January 2008, 09:19
hi,
I am looking for a very peculiar solution and not even sure if it makes any sense or not.
I have a situaiton where I have 2 Qlabels (one text label and another picture label)placed one above the other, the width and height of the screen is fixed. when the text on the label (top label)increases the QLabel should expand itself vertically so that it can show the text over the picture label.
I have used this solution when the qlabels were arranged horizontally, In that case the text label can draw itsef on the picture label but we have to set the property "layoutdirection" to qt:Righttoleft
Or is there any other way where i can get the desired effects ?

jpn
3rd January 2008, 09:36
Sorry, I don't understand the problem. It's the default behavior when using layouts, isn't it?

anju123
3rd January 2008, 12:09
ok,
I will try to rephrase it
Firstly I am working on the full screen i.e. there is no option for the controls to expand further. Now there are 2 QLabels , one text and the other picture . I can adjust the layout and the Qlabel property so that If the text label grows the picture label shrinks, but I want a solution that is if the text label grows it is displayed over the picture label, so that the picture is also not shrinked .

elcuco
3rd January 2008, 15:35
Using the layout direction to o this is wrong. To understand why, put text which ends with "..." to a QLabel and change the label's layout direction. Not a good idea.