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

Display of long text in QComboBox

    XMLWordPrintable

Details

    Description

      When a text is too long to fit inside the QComboBox popup it appears with "..." in the middle (e.g. "very_very_long_long_text" would
      show up as "very_ve...og_text"). The scroll bar shows up but the text still appears with the "..." in the center.

      Fault reproduced in Qt 4.5.2.

      Test case to reproduce issue
      =========================
      #include <QApplication>
      #include <QComboBox>
      #include <QAbstractItemView>

      int main(int argc, char ** argv)
      {
      QApplication app(argc, argv);
      QComboBox cb;
      cb.setMaximumSize(70,10);
      cb.addItem("very_very_long_long1_text");
      cb.addItem("very_very_long_long2_text");
      QAbstractItemView * view = cb.view();
      view->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
      cb.show();
      cb.showPopup();
      return app.exec();
      }

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              goffart Olivier Goffart (closed Nokia identity) (Inactive)
              admin Administrator
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes