24 QDialogButtonBox *buttonBox =
new QDialogButtonBox;
25 buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
26 connect(buttonBox, &QDialogButtonBox::accepted,
this, &QDialog::accept);
27 connect(buttonBox, &QDialogButtonBox::rejected,
this, &QDialog::reject);
29 m_itemsEditor =
new ItemListEditor(form,
nullptr);
30 m_itemsEditor->layout()->setContentsMargins(QMargins());
31 m_itemsEditor->setNewItemText(tr(
"New Item"));
33 QFrame *sep =
new QFrame;
34 sep->setFrameStyle(QFrame::HLine | QFrame::Sunken);
36 QBoxLayout *box =
new QVBoxLayout(
this);
37 box->addWidget(m_itemsEditor);
39 box->addWidget(buttonBox);