summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-10-13 13:38:34 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-17 02:46:53 +0200
commit8a2a4c60224f31fed784a50402a20da2151b9896 (patch)
tree3edd0d0f60bb765eed514ac5ed873970aa529673 /src
parent2c874192548bc34fc1934d86dd92541752492d45 (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> (cherry picked from qt5/qtbase commit 8d56ed85bdce40bca7b8457527103988efb3afcd) Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qcombobox.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 4097712a73..cf0f2194cd 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -2049,10 +2049,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
{