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

QComboBox doesn't remember text if it's been set before the first addItem()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.3.2
    • Other
    • None

    Description

      QComboBox doesn't remember text if it's been set before the first addItem().

      This can be seen in the following example :

      #include <QComboBox>
      #include <QApplication>
      #include <QLineEdit>
      int main(int argc, char **argv) {
      QApplication app(argc, argv);
      QComboBox box;
      box.setEditable(true);
      box.setEditText ( "My custom choice 1 vanishes" );
      box.addItem("Standard choice 1");
      box.addItem("Standard choice 2");
      // box.setEditText ( "My custom choice 2 this stays" );
      box.show();
      return app.exec();
      }

      Attachments

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

        Activity

          People

            monsen Marius Bugge Monsen
            dettman Dean Dettman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes