diff --git a/sdrgui/gui/valuedial.cpp b/sdrgui/gui/valuedial.cpp index affd40088..e5037df0e 100644 --- a/sdrgui/gui/valuedial.cpp +++ b/sdrgui/gui/valuedial.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "gui/valuedial.h" @@ -33,9 +34,12 @@ ValueDial::ValueDial(QWidget *parent, ColorMapper colorMapper) : setAutoFillBackground(false); setAttribute(Qt::WA_OpaquePaintEvent, true); setAttribute(Qt::WA_NoSystemBackground, true); + setAttribute(Qt::WA_InputMethodEnabled, true); setMouseTracking(true); setFocusPolicy(Qt::StrongFocus); + setInputMethodHints(Qt::ImhDigitsOnly); + m_background.setStart(0, 0); m_background.setFinalStop(0, 1); m_background.setCoordinateMode(QGradient::ObjectBoundingMode); @@ -326,6 +330,11 @@ void ValueDial::mousePressEvent(QMouseEvent *event) } else if (mouseButton == Qt::LeftButton) // set cursor at current digit { + if (qApp->autoSipEnabled()) + { + QGuiApplication::inputMethod()->show(); + } + m_cursor = i; m_cursorState = true; m_blinkTimer.start(400); diff --git a/sdrgui/gui/valuedialz.cpp b/sdrgui/gui/valuedialz.cpp index 1f60a1f1a..5d9ed8be8 100644 --- a/sdrgui/gui/valuedialz.cpp +++ b/sdrgui/gui/valuedialz.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include "gui/valuedialz.h" @@ -36,8 +37,10 @@ ValueDialZ::ValueDialZ(bool positiveOnly, QWidget* parent, ColorMapper colorMapp setAutoFillBackground(false); setAttribute(Qt::WA_OpaquePaintEvent, true); setAttribute(Qt::WA_NoSystemBackground, true); + setAttribute(Qt::WA_InputMethodEnabled, true); setMouseTracking(true); setFocusPolicy(Qt::StrongFocus); + setInputMethodHints(Qt::ImhFormattedNumbersOnly); m_background.setStart(0, 0); m_background.setFinalStop(0, 1); @@ -347,6 +350,11 @@ void ValueDialZ::mousePressEvent(QMouseEvent* event) } else if (mouseButton == Qt::LeftButton) // set cursor at current digit { + if (qApp->autoSipEnabled()) + { + QGuiApplication::inputMethod()->show(); + } + m_cursor = i; m_cursorState = true; m_blinkTimer.start(400);