Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-18502

QML needs better layout support

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • 4.7.3, 5.0.0
    • Quick: Layouts
    • None

    Description

      Even accomplishing layouts that seem straight-forward is too difficult.
      Here's two examples that has me stomped:

      Checkbox with text on right side:
      1) Checkbox-button is of fixed size
      2) Implicit size is implicit size of Checkbox-button + implicit size of text + margins
      3) Text use as much space as it can, truncating the text if there's not enough space
      4) Between the checkbox and the text there's a space if the text is not empty
      

      This one is even tougher:

      Button with icon and text:
      1) Button may have text and/or icon.
      2) Icon is left of text
      3) Implicit size of the button is implicit size of icon + implicit size of text + margins
      4) If button is not wide enough, the text is truncated
      6) If the button is not high enough, the icon is scaled down with preserved aspect ratio
      7) If the button is wider or higher than its implicit size, the icon and text is centered. The icon is never scaled up.
      

      Attachments

        1. layout_bug.zip
          2 kB
        2. layout-bug-narrow.png
          layout-bug-narrow.png
          232 kB
        3. layout-bug-wide.png
          layout-bug-wide.png
          279 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            smd Jan Arve
            mathiasm Mathias Malmqvist
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes