# qml cannot receive messages sent by vtk&c++

**URL:** <https://discourse.vtk.org/t/qml-cannot-receive-messages-sent-by-vtk-c/13144>\
**Category:** Development\
**Tags:** code\
**Created:** [January 25, 2024, 4:30am UTC](https://discourse.vtk.org/t/qml-cannot-receive-messages-sent-by-vtk-c/13144 "2024-01-25T04:30:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chloe](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/839c29/32.png) [@chloe](https://discourse.vtk.org/u/chloe)\
**Post date:** [January 25, 2024, 4:30am UTC](https://discourse.vtk.org/t/qml-cannot-receive-messages-sent-by-vtk-c/13144/1 "2024-01-25T04:30:49Z")

</div>

qml does not receive the signal sent when the Qevent mouse event changes in vtk derived class MyObject, but if the emit function is called directly from the main function using the object of MyObject, qml can accept it. Why? Thank you for your answers!

 ![image](https://discourse.vtk.org/uploads/default/original/2X/7/74954c75627557bdf798685f0fb1d3da03db6930.png)  
 ![image](https://discourse.vtk.org/uploads/default/original/2X/f/f9a4184b6254fa6d67112f173dced18805c163b6.png)  
 ![image](https://discourse.vtk.org/uploads/default/original/2X/8/8aef2a101c61afa4b3aeebfc0af40decf619f950.png)
