32 lines
726 B
C++
32 lines
726 B
C++
|
#include "guidededitor.h"
|
||
|
|
||
|
GuidedEditor::GuidedEditor(QWidget *parent) : QWidget(parent)
|
||
|
{
|
||
|
editorLayout = new FlowLayout(this);
|
||
|
this->setLayout(editorLayout);
|
||
|
//tests
|
||
|
this->editorLayout->addWidget(new EditorElement(this));
|
||
|
this->editorLayout->addWidget(new EditorElement(this));
|
||
|
QString style = QString(
|
||
|
"QWidget {"
|
||
|
"border-radius: 5px;"
|
||
|
"background: white }"
|
||
|
"QLabel {border: 2px dashed black; background: gray; "
|
||
|
"border-radius: 5px;}"
|
||
|
"QLineEdit {border: 2px dashed black;background: dark-gray;"
|
||
|
"border-radius: 5px;}"
|
||
|
);
|
||
|
this->setStyleSheet(style);
|
||
|
|
||
|
}
|
||
|
|
||
|
void GuidedEditor::addElement() {
|
||
|
this->editorLayout->addWidget(new EditorElement(this));
|
||
|
}
|
||
|
|
||
|
GuidedEditor::~GuidedEditor()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|