diff options
author | Florian Jung <flo@windfisch.org> | 2012-03-15 18:21:23 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2012-03-15 18:21:23 +0000 |
commit | 27b7bf6815cda7abb67026c37b3e44daee1803cb (patch) | |
tree | 0b9d1c0bc84ac7ff8032e707f2b5fb4e0aaabb5c /muse2/awl/sigspinbox.cpp | |
parent | 2d6f113a10eb485694e20a78500f650776d701e3 (diff) |
merged with trunk
Diffstat (limited to 'muse2/awl/sigspinbox.cpp')
-rw-r--r-- | muse2/awl/sigspinbox.cpp | 10 |
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: |