From 816c5540179362500dfc175b77f05abf3ef25233 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Wed, 18 Jul 2012 22:02:43 +0200 Subject: [PATCH] make currentText the USER property for QComboBox QItemDelegate takes the USER property as the value to be set using model->setData(). The text is what is expected. follow-up to b1b87a73012342dc1619a8e907ea9954d59ca564 which in Qt 4.8.0 broke the interaction between QComboBox and QItemDelegate used by QDataWidgetMapper and item views. Task-number: QTBUG-26501 Change-Id: I005a0a6af5265ee22baf417957e520992d16d6e1 Reviewed-by: Stephen Kelly --- src/widgets/widgets/qcombobox.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h index 04736df..3296fd7 100644 --- a/src/widgets/widgets/qcombobox.h +++ b/src/widgets/widgets/qcombobox.h @@ -66,8 +66,8 @@ class Q_WIDGETS_EXPORT QComboBox : public QWidget Q_ENUMS(SizeAdjustPolicy) Q_PROPERTY(bool editable READ isEditable WRITE setEditable) Q_PROPERTY(int count READ count) - Q_PROPERTY(QString currentText READ currentText) - Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged USER true) + Q_PROPERTY(QString currentText READ currentText USER true) + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) Q_PROPERTY(int maxVisibleItems READ maxVisibleItems WRITE setMaxVisibleItems) Q_PROPERTY(int maxCount READ maxCount WRITE setMaxCount) Q_PROPERTY(InsertPolicy insertPolicy READ insertPolicy WRITE setInsertPolicy) -- 2.7.4