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

QCompleter not working in Qt 5.0.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.0.0
    • None
    • windows 7 64-bit

    Description

      I have to set the auto completion for the QLineEdit, so i tried using QCompleter. The code shown below works fine in Qt 4.8.4.

      But when i try the same code in Qt 5.0.0 (32 bit), it just throws me an error.
      QLineEdit:: cannot convert parameter 1 from QCompleter to QCompleterExample.

      QStringList wordList;
      wordList << "alpha" << "omega" << "omicron" << "zeta";

      QLineEdit *lineEdit = new QLineEdit(this);

      QCompleter *completer = new QCompleter(wordList, this);
      completer->setCaseSensitivity(Qt::CaseInsensitive);
      lineEdit->setCompleter(completer);

      As per the docs 5.0 of QLineEdit::setCompleter() it takes QCompleter as an argument but when i looked in the source code its specified as

      #ifndef QT_NO_COMPLETER
      void setCompleter(QCompleterExample *completer);
      QCompleterExample *completer() const;
      #endif

      Thanks & Regards

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            macro Javid Roshan
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes