forked from qt-creator/qt-creator
Copilot: Add Tooltip to links
Change-Id: I24a74272e58658fa607779e73baa7ada56bf085e Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -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"(
|
||||||
|
Reference in New Issue
Block a user