Results 1 to 4 of 4

Thread: Rezizing the Qlabels vertically

  1. #1
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Rezizing the Qlabels vertically

    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 ?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Rezizing the Qlabels vertically

    Sorry, I don't understand the problem. It's the default behavior when using layouts, isn't it?
    J-P Nurmi

  3. #3
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Rezizing the Qlabels vertically

    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 .

  4. #4
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Rezizing the Qlabels vertically

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.