引用第4楼dbzhang800于2009-12-04 18:14发表的 :
finished 是这个样子的
void finished ( int exitCode, QProcess::ExitStatus exitStatus )
而start,也没有你写的这个吧(如果不是你的自定义函数的话)
恩,呵呵,我都写错了,查了关于void finished ( int exitCode, QProcess::ExitStatus exitStatus )的说明,但不明白里面参数是怎么设的,
void QProcess::finished ( int exitCode, QProcess::ExitStatus exitStatus ) [signal]
This signal is emitted when the process finishes. exitCode is the exit code of the process, and exitStatus is the exit status. After the process has finished, the buffers in QProcess are still intact. You can still read any data that the process may have written before it finished.
我现在想实现的是:有一个
主应用程序A在运行,它里面串口是一直打开的,A界面中有个
按钮,当我点击时通过新建一个QProcess对象(
process)来起动
应用程序B。B也需要用到串口的,当我找开进程B时,我把A的串口先关掉,再打开B,这样我是实现了,但我现在的问题是,当B一结束,A中的串口就打开,这个process结束的信号怎么写?
请再指点一下,谢谢!