mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
Allow Android virtual keyboard to change sign in ValueDialZ widget
This commit is contained in:
parent
c8af6e755e
commit
e5c887646a
@ -474,6 +474,17 @@ void ValueDialZ::leaveEvent(QEvent*)
|
||||
}
|
||||
}
|
||||
|
||||
void ValueDialZ::inputMethodEvent(QInputMethodEvent* event)
|
||||
{
|
||||
// Android numeric virtual keyboard sends inputMethodEvents rather than keyPressEvent for . and -.
|
||||
// No + on keyboard, so use either to flip sign
|
||||
if ((event->commitString() == ".") || (event->commitString() == "-"))
|
||||
{
|
||||
setValue(-m_value);
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void ValueDialZ::keyPressEvent(QKeyEvent* value)
|
||||
{
|
||||
if(m_cursor >= 0)
|
||||
|
@ -83,6 +83,7 @@ private:
|
||||
void wheelEvent(QWheelEvent*);
|
||||
void leaveEvent(QEvent*);
|
||||
void keyPressEvent(QKeyEvent*);
|
||||
void inputMethodEvent(QInputMethodEvent*);
|
||||
void focusInEvent(QFocusEvent*);
|
||||
void focusOutEvent(QFocusEvent*);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user