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

[REG] QLineEdit shows leftovers of edit cursor after clear()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P0: Blocker P0: Blocker
    • 4.6.3
    • 4.6.1
    • None
    • Tested on Mac, Windows and Linux
    • 5cc417be7eb5e43180f92ea2cc46cbf4c4d7395a

      This is a regression from Qt 4.6.0.

      When calling clear() on a QLineEdit, then the edit cursor will remain visible in the QLineEdit.

      The following example reproduces the problem:

      Tested on Windows

      #include <QtGui>
      
      int main (int argc, char* argv[])
      {
      	QApplication app (argc, argv);
      
      	QDialog mainWindow;
      	QVBoxLayout* layout = new QVBoxLayout(&mainWindow);
      	QComboBox* cb1 = new QComboBox(&mainWindow);
      	QLineEdit* edit1 = new QLineEdit("hello", &mainWindow);
      	QLineEdit* edit2 = new QLineEdit("there", &mainWindow);
      	layout->addWidget(cb1);
      	layout->addWidget(edit1);
      	layout->addWidget(edit2);
      	edit1->clear();
      	edit2->clear();
      
      	mainWindow.show();
      	return app.exec();
      }

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

            pullatti Prasanth Ullattil
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes