Qt4 从plasmoid执行特定命令

Qt4 从plasmoid执行特定命令,qt4,kde,plasmoid,Qt4,Kde,Plasmoid,我正在编写一个远程控制Plasmoid,我希望它通过ssh向远程主机发送某些命令,我已经尝试过: QProcess p; p.start("/home/user/bin/command"); p.waitfForFinished(-1); 其中,命令是一个 #!/bin/bash ssh user@remote_host remote_command &> /dev/null & 我也试过使用 KRun::run(QString("/hom

我正在编写一个远程控制Plasmoid,我希望它通过ssh向远程主机发送某些命令,我已经尝试过:

QProcess p;
p.start("/home/user/bin/command");
p.waitfForFinished(-1);
其中,
命令
是一个

#!/bin/bash
ssh user@remote_host remote_command &> /dev/null &
我也试过使用

KRun::run(QString("/home/user/bin/command"), NULL);
但它什么也没用,也许我用错了?
有什么建议吗?

好的,我的问题是我没有正确连接信号,现在我已经这样做了,这部分代码工作得很好

致以最良好的祝愿