From a7e0800508dbdd98441afe2f4e09aba6d30ab665 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sat, 12 Jun 2021 08:57:52 +0100 Subject: [PATCH] Add tooltip showing percentage of TX power when slider is moved --- wfmain.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wfmain.cpp b/wfmain.cpp index b001edd..ab42e4c 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -79,6 +79,11 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, const QString s } amTransmitting = false; + + connect(ui->txPowerSlider, &QSlider::sliderMoved, + [&](int value) { + QToolTip::showText(QCursor::pos(), QString("%1").arg(value*100/255), nullptr); + }); } wfmain::~wfmain()