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