Use QSqlQueryModel with Qt Remote Objects module
Unsolved
General and Desktop
-
Hi everyone
I have next .rep file:class CFooBar { MODEL credsModel(display); };
On source side I call:
QSqlQueryModel* model { new QSqlQueryModel }; model->setQuery( QStringLiteral( "SELECT fname,lname " "FROM \"my_table\"" ), *this ); model->setHeaderData(0, Qt::Horizontal, QObject::tr("First name"), Qt::DisplayRole); model->setHeaderData(1, Qt::Horizontal, QObject::tr("Last name"), Qt::DisplayRole); setCredsModel(model);
This emits
credsModelChanged(model);
, that I set to table view on replica side. But nothing happens. But if I'm usingenableRemoting
andacquireModel
interfaces, it works.How to properly work with MODEL keyword of
repc
in this context?
Thanks!