fixed compile error
This commit is contained in:
parent
182becb31b
commit
91e7b195bf
|
@ -3,6 +3,8 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QRegExpValidator>
|
#include <QRegExpValidator>
|
||||||
|
#include <QRegExp>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
GuidedEditorElementView::GuidedEditorElementView(QWidget* parent)
|
GuidedEditorElementView::GuidedEditorElementView(QWidget* parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
|
@ -35,7 +37,8 @@ void GuidedEditorElementView::setElement(GuidedEditorElement& element)
|
||||||
case ElementType::INPUT:
|
case ElementType::INPUT:
|
||||||
this->input = std::make_unique<QLineEdit>(this);
|
this->input = std::make_unique<QLineEdit>(this);
|
||||||
this->layout->addWidget(input.get());
|
this->layout->addWidget(input.get());
|
||||||
this->input->setValidator(std::make_shared<QRegExpValidator>(element.getSyntaxregex(), input.get()).get());
|
|
||||||
|
this->input->setValidator(std::make_shared<QRegExpValidator>(QRegExp(element.getSyntaxregex())).get());
|
||||||
break;
|
break;
|
||||||
case ElementType::STATIC:
|
case ElementType::STATIC:
|
||||||
this->staticLabel = std::make_unique<QLabel>(this);
|
this->staticLabel = std::make_unique<QLabel>(this);
|
||||||
|
|
Reference in New Issue