Thanks both I will test all of your suggestions.
I thought about
myapp::closeEvent(..... *event)
{
emit sendcmd(); //here I write my "bye bye" on the device
closePort(); // here I close the device
event->accept() // here i finally exit the program
}
myapp::closeEvent(..... *event)
{
emit sendcmd(); //here I write my "bye bye" on the device
closePort(); // here I close the device
event->accept() // here i finally exit the program
}
To copy to clipboard, switch view to plain text mode
I found that this was not a good idea because:
Before I could write sth on the device "closePort" was called....
I think I should make the "emit sendcmd()" direct connected?? Right?
It will return when all the stuff is finished, so closePort can be executed.
Any other ideas to do that?
I think there is not "return value" for signals which i can check if I can proceed or not.
Bookmarks