PDA

View Full Version : QCompleter with horizontal ScrollBar



vajindarladdad
28th August 2009, 11:48
Hi all Experts ,
I am developing an application, in which i have to use a QCompleter .


QStringList wordList;
wordList << "University Of Pune , Pune 7" << "University Of Mumbai , Mumbai 2" << "Delhi University, Delhi 6" << "University Of Bhopal , Bhopal 9";

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


The QCompleter provides a vertical scrollBar by default. Is there any way to attach a horizontal scrollBar to the QCompleter.
Just Give me a hint.

victor.fernandez
28th August 2009, 13:42
completer->popup()->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOn );

vajindarladdad
31st August 2009, 06:01
Thanks a million Victor........