AutoTableModel now can display data from related table.

Usage example of ComboBox binding in Accommodation plugin.
This commit is contained in:
2016-02-12 15:58:12 +01:00
parent 1b6141923f
commit 7ea06881ef
12 changed files with 187 additions and 4 deletions
+14
View File
@@ -1,5 +1,8 @@
#include "acform.h"
#include "ui_acform.h"
#include <QList>
#include "accommodation-odb.hxx"
AcForm::AcForm(QWidget *parent) :
AutoForm<Person>(parent),
@@ -15,3 +18,14 @@ AcForm::~AcForm()
{
delete ui;
}
void AcForm::registerCombos()
{
QList<ComboData> cbData;
Service<Address> srv;
foreach (QSharedPointer<Address> adr, srv.all()) {
cbData.append(ComboData(adr));
}
registerBinding(ui->address, cbData);
}