Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QCompleter not working in Qt 5.0.0

    General and Desktop
    2
    3
    1506
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Macro last edited by

      Hi..

      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.

      why is it not working with Qt 5.0.0.? Should i change anything in the code for working with Qt 5.0.0? Please post your suggestions.

      @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);@

      Thanks & Regards

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        Might be a bug. Please consider "reporting":https://qt-project.org/wiki/ReportingBugsInQt it.

        (Z(:^

        1 Reply Last reply Reply Quote 0
        • M
          Macro last edited by

          Thanks for your reply sierdzio,

          I have filed a bug report for this. please check "Bug - QCompleter not working in Qt 5.0":https://bugreports.qt-project.org/browse/QTBUG-30549

          1 Reply Last reply Reply Quote 0
          • First post
            Last post