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

QML ComboBox is eliding when it shouldn't

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.1.0 RC
    • 5.13.1
    • Quick: Controls 2
    • None
    • 49ffc6e6af83b295c67fd119b79c925879cc292e (qt/qtquickcontrols2/dev)
    • Shovelling Snow, Q1/2020 Finale, Q2/2020 kick off

    Description

      From the mailing list:
       

       If you look into how ComboBox is styled in the code, you’ll notice that the implicit size of the combo box depends on the implicit size of the background, implicit size of the content item, and the padding/inset that’s set for the ComboBox. In order to achieve what you are describing, you can customize the contentItem property of the ComboBox to disable eliding.

       
      This is stuff that I never had to worry about before. If anything I could do combobox.setElided(false) except that was never a thing. I don't know why it is now. I don't know why anyone decided that eliding should be the default. It actively removes information that is critical to making the correct selection. Only if an explicit width is set, would it ever be justified in eliding.  By default, it is actively making the wrong decision. I only set the top and right anchor lines. 
       
      So this bug is about ComboBox auto-eliding text when there is no reason to. It should either auto-elide only when there is an explicit width constraint and text is wider, or truncate. But the implicit size should always be to fit every pixel of the longest item.
       

      Attachments

        Issue Links

          Activity

            People

              mitch_curtis Mitch Curtis
              jasonapk Jason Hihn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: