diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-10-29 07:19:48 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-10-29 12:17:12 +0100 |
commit | 59d8a8b03a0c23842e567d5dc1fb2051d8685c0e (patch) | |
tree | c3f6a2d44db6a89c138afd8dd71a3fa03129e7c5 | |
parent | 8dd7232a88803de15728b0b78df04b13bca4d944 (diff) |
tdf#130857 qt weld: Set widget tooltip defined in .ui file
If a tooltip is defined for a widget in a .ui file,
set that tooltip using QWidget::setToolTip.
This e.g. makes the tooltip for the copy button in the
"Help" -> "About" dialog shown as
"Copy all version information in English" when hovering
over the button with the mouse.
Change-Id: Ida22b3fb8b3626474d4377aac6c51d9f7c7ba2ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175775
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | vcl/qt5/QtBuilder.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index a25f419a915b..740acb951631 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -238,6 +238,7 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, cons QtInstanceWidget::setHelpId(*pWidget, getHelpRoot() + sID); + pWidget->setToolTip(toQString(extractTooltipText(rMap))); pWidget->setVisible(extractVisible(rMap)); #if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0) |