Doc: add notes about validator and completer in QComboBox

When setting the editable property to false, we delete the internal
QLineEdit used by QComboBox. Add comments that this results in the loss
of validator and completer.

Task-number: QTBUG-56035
Change-Id: Ife04ac2b9bb3f32fae5328f1ec73b1d5d769d52c
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com>
bb10
Frederik Gladhorn 2016-10-05 14:27:16 +02:00
parent cd1d114140
commit 23c7816f44
1 changed files with 7 additions and 0 deletions

View File

@ -1678,6 +1678,9 @@ void QComboBox::setIconSize(const QSize &size)
By default, this property is \c false. The effect of editing depends
on the insert policy.
\note When disabling the \a editable state, the validator and
completer are removed.
\sa InsertPolicy
*/
bool QComboBox::isEditable() const
@ -1829,6 +1832,8 @@ QLineEdit *QComboBox::lineEdit() const
\fn void QComboBox::setValidator(const QValidator *validator)
Sets the \a validator to use instead of the current validator.
\note The validator is removed when the editable property becomes \c false.
*/
void QComboBox::setValidator(const QValidator *v)
@ -1862,6 +1867,8 @@ const QValidator *QComboBox::validator() const
By default, for an editable combo box, a QCompleter that
performs case insensitive inline completion is automatically created.
\note The completer is removed when the \a editable property becomes \c false.
*/
void QComboBox::setCompleter(QCompleter *c)
{