diff options
author | Mark Brand <mabrand@mabrand.nl> | 2012-10-13 13:38:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-15 10:18:31 +0200 |
commit | 8d56ed85bdce40bca7b8457527103988efb3afcd (patch) | |
tree | e51508eb14bad82653cb3552582d2b5c08a11a62 /src/widgets/widgets/qcombobox.cpp | |
parent | 7fabf3bd3514c776fb0207ca73021b639e00530f (diff) |
QComboBox::currentText: correct documentation
The documentation previously neglected the fact that the current text
can be provided by the embedded QLineEdit if the combo box is editable
even if there is no selected item.
Change-Id: If40868c1633af7ce81b437d29e1da3fd4fefafb0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Adam Light <aclight@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 98bcf7d6f2..870e25b241 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2007,10 +2007,13 @@ void QComboBoxPrivate::setCurrentIndex(const QModelIndex &mi) /*! \property QComboBox::currentText - \brief the text of the current item + \brief the current text - By default, for an empty combo box or a combo box in which no current - item is set, this property contains an empty string. + If the combo box is editable, the current text is the value displayed + by the line edit. Otherwise, it is the value of the current item or + an empty string if the combo box is empty or no current item is set. + + \sa editable */ QString QComboBox::currentText() const { |