Hello!

I'm using qextserialport for sending data. In my program I have no GUI. The progam will automatic start in the background when the PC is started. I need to set RTS low before shutdown the program. The program will be shutdown when the power turn off. In my testprogram I push x-button in Application Output.

Is it possible to catch some shutdownsignal so I can call

Qt Code:
  1. CommPort->setRts(0);
To copy to clipboard, switch view to plain text mode 

before the PC is shutdown. It is possible to use another connect for a shutdown signal?

My main program is like, I have deleted some code that I think are irrelevant:

Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QCoreApplication a(argc, argv);
  4. createDatabaseConnection();
  5.  
  6. // Initiate all modules
  7. FlexiBlinkRX flexiBlinkRx;
  8. FBtoFLTP FBtoFLTP1;
  9. FilterEngine filterEngine;
  10. smsThread SMSThread;
  11.  
  12. SMSThread.start();
  13.  
  14. // Connect all signals between modules
  15. FBtoFLTP1.connect (&flexiBlinkRx, SIGNAL(incommingDataSignal()), SLOT(startTask()));
  16. filterEngine.connect (&FBtoFLTP1, SIGNAL(inputToQueueSignal()), SLOT(checkqFilterQueue()));
  17.  
  18. // Start executing
  19. a.exec();
  20.  
  21. SMSThread.quit();
  22. SMSThread.wait();
  23.  
  24. flexiBlinkRx.CommPort->setRts(0);
  25. return 0;
  26. }
To copy to clipboard, switch view to plain text mode