Can C functions send data to QT Slots in QT5.7 ?
Unsolved
Language Bindings
-
Dear Friends
I want to do some trail work for proof of concept of my project.
What I need is I have C source code that needs to communicate with QT slots. I am using QT Creator IDE and QT5.7.
Ex unsigned int a[100]={ 25, 17 , 10, 6, -5 , -6, -8 , 10, ......... }; I am required to send this array data to QT GUI through Slots, from C source file to QT Slots is that possible? If possible please someone shows the code snippet in QT that will help me a lot Thanks vivekyuvan
-
You can't send a signal from C. You can create a C++ wrapper around your C code, though, and emit the signal from there.
-
As @sierdzio already said, you cannot directly call C++ from C, and therefore you cannot use Qt.. But it is possible to write a wrapper, like discussed here: https://stackoverflow.com/questions/3583353/calling-c-class-member-function-from-c-code
From within the C++ class, you can access all kind of Qt stuff again.