Qt-interest Archive, March 2007
Antw: Problem with QCompleter
Message 1 in thread
Nevermind! By mistake i deleted one line of code and that's why it
didn't work any more...
Christian Rengstl M.A.
Klinik und Poliklinik fÃr Innere Medizin II
Kardiologie - Forschung
UniversitÃtsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230
>>> Christian Rengstl 02.03.07 17.16 Uhr >>>
Hi list,
i have a problem using QCompleter in my subclass of QTextEdit. In the
following code cout prints what is expected, but i don't see any popup
appear.
if (completionPrefix != _completer->completionPrefix()) {
_completer->setCompletionPrefix(completionPrefix);
_completer->popup()->setCurrentIndex(_completer->completionModel()->index(0,
0));
cout << "KeyPressEvent: " <<
_completer->completionModel()->index(0,
0).data().toString().toStdString() << endl;
}
QRect cr = cursorRect();
cr.setWidth(_completer->popup()->sizeHintForColumn(0)
+
_completer->popup()->verticalScrollBar()->sizeHint().width());
QCompleter::completionMode is set to popup of course.
Is there something i am missing?
Thanks!
Christian Rengstl M.A.
Klinik und Poliklinik fÃr Innere Medizin II
Kardiologie - Forschung
UniversitÃtsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230
--
[ signature omitted ]