here it is the code of the click slot of one button:
void MainJackSMS::on_InviaSMS_clicked(){
arguments <<"-sms64"<<_smsText<<"-dest"<<_dest;
arguments <<"-serv"<<_serv;
connect(SendSmsProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(ReadStdoutSendSms()));
SendSmsProcess->start(JACKSMS_BINARY_FILENAME,arguments);
}
void MainJackSMS::on_InviaSMS_clicked(){
SendSmsProcess = new QProcess( this );
QStringList arguments;
arguments <<"-sms64"<<_smsText<<"-dest"<<_dest;
arguments <<"-serv"<<_serv;
connect(SendSmsProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(ReadStdoutSendSms()));
SendSmsProcess->start(JACKSMS_BINARY_FILENAME,arguments);
}
To copy to clipboard, switch view to plain text mode
(note: _smsText, _serv and _dest are results of some omitted functions)
SendSmsProcess is declared in the declaration of the class ( into the header file)
private:
private:
QProcess *SendSmsProcess;
To copy to clipboard, switch view to plain text mode
the object pointed from SendSmsProcess is destroyed when the program is closed(actually for some test i don't destroy the object). it can be a problem?
EDIT: during some tests today, i've writthen another line (now are 6 lines) from the clt to stdout and the qt gui has readed all the lines except the 6th line. afther that i've printed out with a loop 100 lines, but only 99 lines are readed from the gui. the problem is always the same.
Bookmarks