class not registered with qt meta object
yangxingpping opened this issue · 2 comments
yangxingpping commented
when I cop unittest tst_datetime's db and sampletable class to an simple demo, it cause fatal
for sampletable
qFatal("The class %s is not registered with qt meta object", qPrintable(name));
code snippet :
DB db;
db.setDriver("QSQLITE");
db.setDatabaseName("hello.db");
auto bOpen = db.open();
Can add some additional demos for how to use it?
HamedMasafi commented
Hi @yangxingpping
You need to register the all classes used in Nut (Database and tables) with qRegisterMetaType function. For more information please take a look at tests.
yangxingpping commented
Thank you!