connected date-edits to updates

pull/12/head
mandlm 2018-07-17 20:33:38 +02:00
parent 00a4d37ec3
commit b69a748f94
3 changed files with 15 additions and 2 deletions

View File

@ -17,7 +17,7 @@ DataModel::DataModel(QObject *parent)
{
connect(&m_plural, &PluralModel::dataChanged, this,
&DataModel::pluralModelChanged);
connect(&m_metaData, &PluralModel::dataChanged, this,
connect(&m_metaData, &MetaDataModel::dataChanged, this,
&DataModel::metaDataChanged);
connect(&m_genus, &GenusModel::dataChanged, this,
&DataModel::genusModelChanged);

View File

@ -4,6 +4,7 @@
#include "MetaDataModel.h"
#include <QDataWidgetMapper>
#include <QDebug>
MetaDataWidget::MetaDataWidget(QWidget *parent)
: QWidget(parent)
@ -11,6 +12,11 @@ MetaDataWidget::MetaDataWidget(QWidget *parent)
, m_widgetMapper(new QDataWidgetMapper(this))
{
ui->setupUi(this);
connect(ui->dateOfTestDateEdit, &QDateEdit::dateChanged, m_widgetMapper,
&QDataWidgetMapper::submit);
connect(ui->dateOfBirthDateEdit, &QDateEdit::dateChanged, m_widgetMapper,
&QDataWidgetMapper::submit);
}
MetaDataWidget::~MetaDataWidget()

View File

@ -61,7 +61,14 @@
</widget>
</item>
<item>
<widget class="QDateEdit" name="dateOfTestDateEdit"/>
<widget class="QDateEdit" name="dateOfTestDateEdit">
<property name="displayFormat">
<string>M/d/yyyy</string>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">