标题:关于Qt调用外部应用程序的问题
作者:luoshe
日期:2006-11-17 10:12
内容:
请问如何在Qt中调用外部应用程序呢?多谢答复
#1 [XChinux 11-17 10:46]
http://www.qtcn.org/blog/blog.php?do-showone-tid-541.html
#2 [luoshe 11-22 15:57]
XChinux老大,我用的是qt3.3,QProcess里好象没有execute这个成员,我查过在Qt4系列里面的QProcess里才有execute这个成员,请问在qt3系列中应该怎么做呢
#3 [cavendish 11-22 17:08]
你看文档么?
http://doc.trolltech.com/3.3/qprocess.html
UicManager::UicManager()
{
proc = new QProcess( this );
proc->addArgument( "uic" );
proc->addArgument( "-tr" );
proc->addArgument( "i18n" );
proc->addArgument( "small_dialog.ui" );
connect( proc, SIGNAL(readyReadStdout()),
this, SLOT(readFromStdout()) );
if ( !proc->start() ) {
// error handling
}
}
void UicManager::readFromStdout()
{
// Read and process the data.
// Bear in mind that the data might be output in chunks.
}