重新定义一个SLOT ,使用system( ) 调外部命令,给点程序你参考.
#include <cstdlib>
one = new QPushButton( tr("Reboot"),this);
connect(one,SIGNAL(clicked()),SIGNAL(mysign1()));
connect(this,SIGNAL(mysign1()),SLOT(reboot()));
//如果直接传过来一直有问题,我就中间多传一 次, 也不知道是什么原因,
void Threebutton::reboot( )
{
system("/sbin/reboot");
}