summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/awl/sigspinbox.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/muse2/awl/sigspinbox.cpp b/muse2/awl/sigspinbox.cpp
index 6e38b164..a4e4b21f 100644
--- a/muse2/awl/sigspinbox.cpp
+++ b/muse2/awl/sigspinbox.cpp
@@ -1,14 +1,34 @@
#include "sigspinbox.h"
#include "al/sig.h"
#include <QKeyEvent>
+#include <QMouseEvent>
#include <stdio.h>
+#include <QLineEdit>
+
+class MyLineEdit : public QLineEdit
+{
+ public:
+ MyLineEdit() : QLineEdit() {};
+ MyLineEdit(QWidget* parent) : QLineEdit(parent) {};
+
+ protected:
+ virtual void mousePressEvent (QMouseEvent* e)
+ {
+ QLineEdit::mousePressEvent(e);
+ printf("!!!\n");
+ selectAll();
+ }
+};
+
SigSpinBox::SigSpinBox(QWidget *parent) :
QSpinBox(parent)
{
_denominator=false;
+ setLineEdit(new MyLineEdit(this));
}
-void SigSpinBox::keyPressEvent(QKeyEvent*ev)
+
+void SigSpinBox::keyPressEvent(QKeyEvent* ev)
{
switch (ev->key()) {
case Qt::Key_Return: