Is this what you want?
#include <QApplication>
#include <QCompleter>
#include <QStringListModel>
#include <QLineEdit>
int main(int argc, char **argv){
com.setModel(&model);
le.setCompleter(&com);
le.show();
return app.exec();
}
#include <QApplication>
#include <QCompleter>
#include <QStringListModel>
#include <QLineEdit>
int main(int argc, char **argv){
QApplication app(argc, argv);
QLineEdit le;
QCompleter com;
QStringListModel model(QStringList() << "\\s" << "\\t" << "\\n");
com.setModel(&model);
le.setCompleter(&com);
le.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks