Copilot: Add Tooltip to links

Change-Id: I24a74272e58658fa607779e73baa7ada56bf085e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-06-19 17:14:34 +02:00
parent 2ad12b5b2c
commit 8aff1dfd85

View File

@@ -13,6 +13,8 @@
#include <utils/layoutbuilder.h> #include <utils/layoutbuilder.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <QToolTip>
using namespace Utils; using namespace Utils;
using namespace LanguageClient; using namespace LanguageClient;
@@ -34,6 +36,9 @@ public:
| Qt::LinksAccessibleByKeyboard | Qt::LinksAccessibleByKeyboard
| Qt::TextSelectableByMouse); | Qt::TextSelectableByMouse);
helpLabel->setOpenExternalLinks(true); helpLabel->setOpenExternalLinks(true);
connect(helpLabel, &QLabel::linkHovered, [](const QString &link) {
QToolTip::showText(QCursor::pos(), link);
});
// clang-format off // clang-format off
helpLabel->setText(Tr::tr(R"( helpLabel->setText(Tr::tr(R"(