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,3 +1,4 @@
#include <data/comboitem.h>
#include "person.h"
Person::Person()
@@ -30,6 +31,19 @@ void Person::setLastName(const QString &value)
{
lastName = value;
}
QSharedPointer<QObject> Person::address() const
{
return m_address;
}
void Person::setAddress(const QSharedPointer<QObject> &address)
{
if (qobject_cast<Address*>(address.data()) != NULL)
{
m_address = qSharedPointerDynamicCast<Address, QObject>(address);
}
}