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

Only "..." is displayed for some elements in a QComboBox

XMLWordPrintable

    • 8577353b2a5155600e672955e7c6a61e9e9519ca

      When having a list of elements in a QComboBox then the combobox dropdown list may be too narrow and only display "..." for some elements instead of the actual element text.

      This is reproducible using the example below. Set the fonts to "Extra large" and then run the example on Windows. Open the combo box and see a list of percentages. Note that all items below 9% are only shown as ellipsis.

      int main(int argc, char *argv[])
      {
      	QApplication a(argc, argv);
      	QMainWindow mw;
      	QToolBar *toolBar = new QToolBar;
      	mw.addToolBar(toolBar);
      	QComboBox *cb = new QComboBox;
      	for (int i = 1; i <= 32; i++)
      		cb->addItem(QString("%1%").arg(i));
      	toolBar->addWidget(cb);
      	mw.show();
      	a.exec();
      	return 0;
      }

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

            bachewii Jens
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes