QmlRegisterType and how to connect signal and slot to its template type
-
hi,
i have a class songitemmodeler inherited from QAbstractListModel that fill's a list view in Qml side,
i want to create another class and implement another tools for my Music Player and register it with setContextProperty(),because i want to use functionality like playing and pausing media in different pages,and with qmlRegisterType it cannot be done,
so my question is how can i do this? because i use qmlRegisterType and with this,i do not instantiate my songitemmodeler,qmlRegisterType<songitemmodeler>("SongFinder",1,0,"Songfinder");
and when i didn't instantiate a class ,i can't connect any of it's signal or slot to another instance of another class?
is there anyway to expose my songitemmodeler like a singleton?or anyway to connect its signal and slot to another class in constructor or something?
thank you. -
@ahmad98 said in QmlRegisterType and how to connect signal and slot to its template type:
is there anyway to expose my songitemmodeler like a singleton?