summaryrefslogtreecommitdiff
path: root/muse2/awl/sigspinbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/awl/sigspinbox.cpp')
-rw-r--r--muse2/awl/sigspinbox.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/muse2/awl/sigspinbox.cpp b/muse2/awl/sigspinbox.cpp
index f1399538..f3cbe06d 100644
--- a/muse2/awl/sigspinbox.cpp
+++ b/muse2/awl/sigspinbox.cpp
@@ -8,8 +8,7 @@
class MyLineEdit : public QLineEdit
{
public:
- MyLineEdit() : QLineEdit() {};
- MyLineEdit(QWidget* parent) : QLineEdit(parent) {};
+ MyLineEdit(QWidget* parent = 0) : QLineEdit(parent) {};
protected:
virtual void mousePressEvent (QMouseEvent* e)
@@ -19,10 +18,10 @@ class MyLineEdit : public QLineEdit
}
};
-
SigSpinBox::SigSpinBox(QWidget *parent) :
QSpinBox(parent)
{
+ setKeyboardTracking(false);
_denominator=false;
setLineEdit(new MyLineEdit(this));
}
@@ -31,9 +30,14 @@ void SigSpinBox::keyPressEvent(QKeyEvent* ev)
{
switch (ev->key()) {
case Qt::Key_Return:
+ QSpinBox::keyPressEvent(ev);
emit returnPressed();
return;
break;
+ case Qt::Key_Escape:
+ emit escapePressed();
+ return;
+ break;
case Qt::Key_Left:
case Qt::Key_Right:
case Qt::Key_Slash: