Changing submit policy of QDataWidgetMapper to AutoSubmit because if multiple changes are made at once not all of them are applied.

This commit is contained in:
2026-01-01 09:52:24 +01:00
parent bcba8f8452
commit 683f5d224c
5 changed files with 20 additions and 8 deletions

View File

@ -6,12 +6,12 @@
#include <QScreen>
#include <QVBoxLayout>
AbstractDialog::AbstractDialog(QWidget* parent)
AbstractDialog::AbstractDialog(QDialogButtonBox::StandardButtons buttons, QWidget* parent)
: QDialog(parent) {
setWindowTitle(tr("Dialog does what?..."));
setModal(true);
m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
m_buttonBox = new QDialogButtonBox(buttons, this);
connect(m_buttonBox, &QDialogButtonBox::accepted, this, &AbstractDialog::accept);
connect(m_buttonBox, &QDialogButtonBox::rejected, this, &AbstractDialog::reject);