50 setWindowTitle(editor->title());
53 editor->setParent(
this);
56 QVBoxLayout *vlayout =
new QVBoxLayout(
this);
57 vlayout->addWidget(editor);
58 QDialogButtonBox *button_box =
new QDialogButtonBox (
59 QDialogButtonBox::Apply
60 | QDialogButtonBox::Cancel
61 | QDialogButtonBox::Reset,
63 vlayout->addWidget(button_box);
67 &QDialogButtonBox::clicked,
68 [editor, button_box,
this]
69 (QAbstractButton *button)
71 switch(button_box->buttonRole(button))
73 case QDialogButtonBox::RejectRole:
77 case QDialogButtonBox::ResetRole:
80 case QDialogButtonBox::ApplyRole: