Hello Jerome, On Fri, Mar 1, 2019 at 3:34 PM Jérôme Godbout <godbo...@amotus.ca> wrote:
> The fact that the QObject is non copiable, is one of the reason it need a > pointer (which can be copied). As for the ownership, you can check with the > qqmlengine: > > https://doc.qt.io/qt-5/qqmlengine.html#objectOwnership > > > I have understood it yes > You can change the ownership too with setOwnership(). I for one exposed > the methods to Qml so each side can check/set the qobject ownership based > on the needs. This is very helpful to debug. > > You can use QPointer to have a pointer that will return to null if the > qobject get deleted. > OK but I thought a signal should be quite generic, and not necessarily consumed by QML. but maybe we should design special signals for QML, is this what you suggest? I would find more convenient to be able to send a structure by copy, so consumed as it is by QML (wrapped in QML and ownership set to QML) Best regards, Sylvain >
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest