I have a C ++ class emitting signal and a QML slot. I need to execute a slot in the same thread after the program returns to the event loop.
How can I achieve something like this?
Connections {
target: box2dCppEngine
onBulletCollided: box2dCppEngine.deleteObject(bullet)
connectionType: Qt.QueuedConnection
}
I need this because I cannot execute deleteObject while processing the collision, I need to do this after the world step.
source
share