Qt 6.12 LTS is out! See what's new in the release
blog
returning list to QML
-
Hi,
You should provide a minimal code example that shows your problem.
-
class Some(QObject): fakenotify = Signal() @Property('QVariantList', notify=fakenotify2) def withprop(self): with db_session: return self.db.Page.recents() @Slot(result=list) def withslot(self): with db_session: return self.db.Page.recents()in some ListView using as model:
some.withpropworks
but
some.whithslot()fails with :qrc:/qml/main.qml:54: TypeError: Cannot call method 'withslot' of null -
Please provide a complete minimal test case including the qml you are using.