diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-17 13:58:47 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-29 11:10:26 +0000 |
commit | 08a732b69e951b8f1ca53d2e047c432407f42d67 (patch) | |
tree | e3d12a42efc35171acfd70179d1e5c87197f1a41 /src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp | |
parent | ac1af7d6acdb4bad85cc7a3a42a5a1cb4d407875 (diff) |
Qt Property Browser solution: Split toolTip into valueToolTip and descriptionToolTip.
Make it possible to have different tool tips for the property name
and value.
Add comments pointing out the changes to be ported back to the solution.
Task-number: QTBUG-45442
Change-Id: I31571d3f502be20b7c0bb2c91cbd999e80ee49aa
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp')
-rw-r--r-- | src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp b/src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp index d32f6e5a7..ec0a61712 100644 --- a/src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp +++ b/src/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp @@ -398,7 +398,7 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) font.setUnderline(property->isModified()); item->groupBox->setFont(font); item->groupBox->setTitle(property->propertyName()); - item->groupBox->setToolTip(property->toolTip()); + item->groupBox->setToolTip(property->descriptionToolTip()); item->groupBox->setStatusTip(property->statusTip()); item->groupBox->setWhatsThis(property->whatsThis()); item->groupBox->setEnabled(property->isEnabled()); @@ -408,7 +408,7 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) font.setUnderline(property->isModified()); item->label->setFont(font); item->label->setText(property->propertyName()); - item->label->setToolTip(property->toolTip()); + item->label->setToolTip(property->descriptionToolTip()); item->label->setStatusTip(property->statusTip()); item->label->setWhatsThis(property->whatsThis()); item->label->setEnabled(property->isEnabled()); @@ -425,7 +425,8 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) font.setUnderline(false); item->widget->setFont(font); item->widget->setEnabled(property->isEnabled()); - item->widget->setToolTip(property->valueText()); + const QString valueToolTip = property->valueToolTip(); + item->widget->setToolTip(valueToolTip.isEmpty() ? property->valueText() : valueToolTip); } //item->setIcon(1, property->valueIcon()); } |