allow sliders to be tabbed to

This commit is contained in:
itsmattkc
2019-12-15 20:03:02 +11:00
parent 4630975e43
commit d6d8409bb9
3 changed files with 18 additions and 3 deletions
+10
View File
@@ -33,6 +33,9 @@ SliderLabel::SliderLabel(QWidget *parent) :
QFont f = font();
f.setUnderline(true);
setFont(f);
// Allow users to tab to this widget
setFocusPolicy(Qt::TabFocus);
}
void SliderLabel::mousePressEvent(QMouseEvent *ev)
@@ -70,3 +73,10 @@ void SliderLabel::mouseReleaseEvent(QMouseEvent *ev)
static_cast<QGuiApplication*>(QApplication::instance())->restoreOverrideCursor();
}
void SliderLabel::focusInEvent(QFocusEvent *event)
{
QWidget::focusInEvent(event);
emit focused();
}