Added protected method GridForm::addRow. Increased settings form size.
This commit is contained in:
+7
-2
@@ -57,8 +57,7 @@ public:
|
|||||||
|
|
||||||
connect(m_form, &IForm::recordAdded, [this](){
|
connect(m_form, &IForm::recordAdded, [this](){
|
||||||
//service()->save(form()->entity());
|
//service()->save(form()->entity());
|
||||||
m_tableModel->addRow(form()->entity());
|
addRow(form()->entity());
|
||||||
emit dataChanged();
|
|
||||||
});
|
});
|
||||||
connect(m_form, &IForm::recordUpdated, [this](){
|
connect(m_form, &IForm::recordUpdated, [this](){
|
||||||
//service()->update(form()->entity());
|
//service()->update(form()->entity());
|
||||||
@@ -224,6 +223,12 @@ protected:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void addRow(QSharedPointer<T> entity)
|
||||||
|
{
|
||||||
|
m_tableModel->addRow(entity);
|
||||||
|
emit dataChanged();
|
||||||
|
}
|
||||||
|
|
||||||
void showImportButton()
|
void showImportButton()
|
||||||
{
|
{
|
||||||
QHBoxLayout *tbLayout = qobject_cast<QHBoxLayout*>(this->toolbar()->layout());
|
QHBoxLayout *tbLayout = qobject_cast<QHBoxLayout*>(this->toolbar()->layout());
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>1000</width>
|
||||||
<height>600</height>
|
<height>700</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
|||||||
Reference in New Issue
Block a user