How to contact parent process from child in QT (C++) to perfom method from class? -


I have a question that I am currently working on the program in QT (C ++) and I have this problem . If I check the checkbox, then it starts a method where the fork () is applied, the parent process continues till the end (for keeping an uncontrolled GUI) a hair process works in the ifinite loop After completing the sequence, I store the necessary data in the shared memory. Now I need to contact the maternal process to read the data from the shared memory and print it on the GUI. Does it I tried Signal, Pipe, SafeForz ... my problem ... I need to contact the parent process and I need to bring them into the classroom, where there is a method of printing the output of the GUI. If I use Signal Handler, there is no chance to return to class (I need an ID of shared memory to connect). I hope my question is small. I need to find a solution, where I can contact the parent process (something like connecting to QT) and call the necessary method from class.

The way I would probably face this problem, that main formula would be for GUI operation and The check box will then start after the check. This QtTHreatet runs continuously or stops and restarts with the checkbox based on requirements.

Once the process is complete, if the amount of data is small, then it can be used to update the data to a slot display on the GUI thread and the GUI thread. If you have a lot of data (as you specify in your question), make available shared memory for both (either in a separate module or using the pointer created during the creation of a Quathhead object) and up to Protect Access Memory with a shared memory can be made in the QMutex GUI thread and after that the square thread can be passed. When data is prepared for processing, a thread-safe signal worker can be sent from thread to GUI thread and lock the slot (or trial lock) in the GUI thread, by locking QMUtks, from shared memory You can take data and then unlock it. QMutex (and perhaps send it back to the worker thread to say this to continue).

Comments