Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Can I pass a QVariant<QImage> through a signal from Qml to C++?
Andreas Schacherbauer last edited by
I'm using the Qml Item function
grabToImage()and want to emit a custom signal in the callback, passing the image of the grab result. If I log the image object in Qml, it says it's of type QVariant<QImage>, but when I create a QSignalSpy in C++ and try to attach it to the signal in Qml, I get the error message that the signal spy could not connect.
So the question is, can a QVariant<QImage> be passed through a signal from Qml to C++?
but when I create a QSignalSpy in C++ and try to attach it to the signal
Can you show how you did it and what the error was exactly?