[Qt-interest] How to make the Button response quickly?

Kermit Mei kermit.mei at gmail.com
Sun Mar 1 16:41:10 CET 2009


Hello, When I click the button(a common QPushButton), slot pronounce()
will be called. It is defined as the following:

void ScannerWidget::pronounce(){
    QDir wordPath(realPeople.absolutePath().append("/").append(word[0]));
    qDebug(wordPath.absolutePath().toStdString().c_str());
    QProcess::execute(playCmd,
            QStringList(wordPath.absoluteFilePath(word+".wav")));
}

When the words be pronouncing by another program called by QProcess,
the button which I clicked is "down" (I can't clicked it whthin a short 
time),
 and it must wait for process, then it can "up".

How can I make the pushButton "up" as well as the others ?
And,  in fact, I just want to pronounce a word when the last haven't 
finished.

Thanks



More information about the Qt-interest-old mailing list