how to close the window
I'm using qt5.5 on my computer.
This is the UI that i designed.
And when i click the "Burning Test" Button it will going to this page like below.
Then it will execute the .sh file by using QProcess in QT program.
It will show this windows out.
When i clicked stop button (where i show you in the second picture) i will delete all the process and Thread.
This is my program below.
But the windows (where i show you in the third picture) will not closed when i clicked the stop button.
Did i miss anything?
First you should close the thread and then close the window.
But i didnt using thread to open the window.
i'm using thread on other process.
Disconnect the process, then kill the process, it will close the console window.
I'm using both process->close(); and process->terminate(); none of those can work as i expect.
What else should i so ?
Allocate the process in stack instead of heap
Yes, I did try this one.
But the window still not close either.
Can you share the code used to start that application ?
Sure, this is how i start my application.
/usr/share/qt5/examples/qt3d/anaglyph-rendering/anaglyph-rendering -platform wayland
I save it as a shell script and using QProcess to execute this .sh file.
Why are you using a shell script and not Process directly ?
It's just because someone had done it before.
And i just using it by convenient.
Is that the reason why i can't close the window?
You are right!
I try to using Process instead of shell script and it works as my expect!
Thanks a lot!
I still have a question.
Why i have to do it directly from Process but not shell script for instead?
I can't understand.
Could you tell me the difference between those two cases?
Number of layers: you are starting a shell that is starting an application so you'll be "communicating" with that shell but not with the application that was started with that shell.