The scrollbar is provided out of the box once the view has enough items. For the resize handle you may try to abuse QSizeGrip like this:
#include <QtGui>
int main(int argc, char* argv[])
{
for (int i = 0; i < 200; ++i)
words
+= QString("word %1").
arg(i
);
lineEdit.setCompleter(&completer);
lineEdit.show();
completer.popup()->setCornerWidget(sizeGrip);
completer.popup()->setWindowFlags(Qt::FramelessWindowHint | Qt::SubWindow);
return app.exec();
}
#include <QtGui>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QLineEdit lineEdit;
QStringList words;
for (int i = 0; i < 200; ++i)
words += QString("word %1").arg(i);
QCompleter completer(words);
lineEdit.setCompleter(&completer);
lineEdit.show();
QSizeGrip* sizeGrip = new QSizeGrip(completer.popup());
completer.popup()->setCornerWidget(sizeGrip);
completer.popup()->setWindowFlags(Qt::FramelessWindowHint | Qt::SubWindow);
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks