From 23c7816f44cfe02e1e056ab4bb40e618992a0e2b Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 5 Oct 2016 14:27:16 +0200 Subject: Doc: add notes about validator and completer in QComboBox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ Reviewed-by: Nico Vertriest --- src/widgets/widgets/qcombobox.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 450c27d573..0ef76b95f0 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -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) { -- cgit v1.2.3 From 3189313f226f550892a8bd4993ed52b44abea13a Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 11 Oct 2016 09:59:03 +0200 Subject: Doc: Fix typo in QtStyledItemDelegate::paint() docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-56399 Change-Id: Iaace0ed05098ab6d880b06a40d8e13aa9288c5ec Reviewed-by: Topi Reiniƶ Reviewed-by: Frederik Gladhorn --- src/widgets/itemviews/qstyleditemdelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp index 483cfbdc36..7de3ca4b0c 100644 --- a/src/widgets/itemviews/qstyleditemdelegate.cpp +++ b/src/widgets/itemviews/qstyleditemdelegate.cpp @@ -360,7 +360,7 @@ void QStyledItemDelegate::initStyleOption(QStyleOptionViewItem *option, if it is enabled or selected. After painting, you should ensure that the painter is returned to - its the state it was supplied in when this function was called. + the state it was supplied in when this function was called. For example, it may be useful to call QPainter::save() before painting and QPainter::restore() afterwards. -- cgit v1.2.3