src/ui/objecteditor.cpp

changeset 258
fe094d0687ad
parent 252
da4876bfd822
child 263
59b6027b9843
equal deleted inserted replaced
257:afdab56e8210 258:fe094d0687ad
117 117
118 ObjectEditor::ObjectEditor(QWidget* parent) : 118 ObjectEditor::ObjectEditor(QWidget* parent) :
119 QWidget{parent} 119 QWidget{parent}
120 { 120 {
121 this->ui.setupUi(this); 121 this->ui.setupUi(this);
122 this->editorwidgets.resize(NUM_PROPERTIES);
123 QFormLayout* layout = new QFormLayout{this};
124 for (std::size_t i = 0; i < NUM_PROPERTIES; ++i) {
125 const auto key = static_cast<PropertyKey>(i);
126 QLabel* const label = new QLabel{propertyName(key), this};
127 QWidget* const field = new QWidget{this};
128 this->editorwidgets[i] = field;
129 layout->addRow(label, field);
130 }
131 this->ui.properties->setLayout(layout);
132 } 122 }

mercurial