Results 1 to 3 of 3

Thread: Qt 4.3.5 Linux QLabel with wordWrap=true causes layout failure

  1. #1
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt 4.3.5 Linux QLabel with wordWrap=true causes layout failure

    I have a weird problem that I am only seeing on Qt Linux. It doesn't happen on Windows or Mac.

    Problem: If I add a QLabel to a layout in a dialog, and set the "wordWrap" to true, then the layout for the whole dialog seems to fail and it is possible to resize the entire dialog's width and height to 0.

    i.e. it appears like the layout has suddenly lost it's layout manager even though the QLabel is in a Grid. The minimum size is no longer restricted to the minimum size of the widgets.

    If I set the "wordWrap" to false, then the dialog behaves as expected and the minimum size of the dialog is restricted by the widgets it contains.

    Steps to reproduce:
    1. Use Qt Designer to create a dialog with default buttons.
    2. Add a QLabel and set the plain text to a long string of text
    3. Layout everything in a grid.
    4. Preview the dialog and confirm the minimum size of the dialog is restricted
    5. Change the "wordWrap" of the QLabel to true.
    6. Preview the dialog and confirm the minimum size of the dialog is now not restricted and can be sized to 0x0.

    Anyone else have this problem or know of a solution?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.3.5 Linux QLabel with wordWrap=true causes layout failure

    It seems that there are some issues with word wrapping in QLabel (#189948 and #164108). Could you prepare a minimal compilable example that reproduces the problem?

  3. #3
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 4.3.5 Linux QLabel with wordWrap=true causes layout failure

    I got a reply from Trolltech on this:

    This problem has been reported before, and while it could be fixed on
    Windows and Mac, it is still unsolved on X11 as X does not support a
    height-for-width protocol:


    http://trolltech.com/customer/task-t...ntry&id=148038
    http://trolltech.com/customer/task-t...entry&id=94203

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.