QComboBox::currentText: correct documentation
authorMark Brand <mabrand@mabrand.nl>
Sat, 13 Oct 2012 11:38:34 +0000 (13:38 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 15 Oct 2012 08:18:31 +0000 (10:18 +0200)
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>
src/widgets/widgets/qcombobox.cpp

index 98bcf7d..870e25b 100644 (file)
@@ -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
 {