arguments<<"-p"<<"x"<<"djvu.cab"<<path; cabarc = new QProcess(this); cabarc->setProcessChannelMode(QProcess::MergedChannels); connect(cabarc, SIGNAL(finished(int)), this, SLOT(step3_load())); connect(cabarc, SIGNAL(readyReadStandardOutput()), this, SLOT(on_dir_changed())); cabarc->start("CABARC.EXE",arguments);
... cabarc = new QProcess(this); timer = new QTimer; connect(cabarc, SIGNAL(finished(int)), this, SLOT(step3_load())); connect(cabarc, SIGNAL(finished(int)), timer, SLOT(stop())); connect(timer, SIGNAL(timeout()), this, SLOT(on_dir_changed())); cabarc->start("CABARC.EXE",arguments); timer->start(50);}void MainWindow::on_dir_changed() // { path=cabarc->readLine(1000); label->setText(path);}