25 #include <QApplication>
30 : QInputDialog(parent, flags)
33 installEventFilter(
this);
38 if (event->type() == QEvent::KeyRelease)
42 return QInputDialog::eventFilter(
object, event);
52 QString txt = textValue();
53 txt.replace(QRegExp(
","),
".");
55 setDoubleValue(txt.toDouble());
60 QRegExp regex(
"[-]{0,1}[0-9]{1,}[,|.]{0,1}[0-9]{0,2}");
62 if (!regex.exactMatch(textValue()))
64 this->setStyleSheet(
"QLineEdit { color: red;}");
68 this->setStyleSheet(
"QLineEdit { color: black;}");