grid=new QGridLayout(screen);
grid->setSizeConstraint(QLayout::SetMinAndMaxSize);
signalmap=new QSignalMapper(this);
+ //shell=new QProcess(this);a desperated attempt to get the output of my cmd, i've try Qprocess (but don't get it)
valeur=new QMap<QString, QString>;
qDebug()<<"1' connect : "<<connect(signalmap, SIGNAL(mapped(const QString &)), this, SLOT(action(const QString &)));
//qDebug()<<"2' connect : "<<connect(this, SIGNAL(datafilled()), this, SLOT(start()));
+ //a desperated attempt to get the output of my cmd, i've try Qprocess (but don't get it)
+ //qDebug()<<"3' connect : "<<connect(shell, SIGNAL(readyReadStandardOutput()), this, SLOT(shellReady()));
label=new QLabel;
setCentralWidget(screen);
createMenuBar();
}
else if(b[0]==QString("cmd")){
system(c.toStdString().c_str());
-
+ /*QStringList tmp;
+ while(!b.empty())tmp.append(b.takeFirst());
+ //shell->setProgram(QString("/bin/sh"));
+ //shell->setArguments(tmp);
+ shell->start("/bin/sh", tmp);
+ shell->waitForFinished();
+ a desperated attempt to get the output of my cmd, i've try Qprocess (but don't get it)*/
}
else if(b[0]==QString("sav")){
Msav.lock();
conf->setValue(QString("multiline"), QVariant(0));
conf->setValue(QString("startdefault"), QVariant("begin"));
conf->setValue(QString("actionmenu"), QVariant("-menuback"));
+ //conf->setValue(QString("process"), QVariant(0));
d.unlock();
qDebug()<<"firstrun() finished";
}
printItem(*qq);
//}
}
+/*void MainWindow::shellReady(){
+ QMessageBox::information(this, QString("shell"), QString("shell ready"));
+}*/
#include <QtMultimedia/QMediaPlayer>
#include <QtMultimedia/QMediaPlaylist>
#include <QtMultimediaWidgets/QVideoWidget>
+//#include <QProcess>
#ifndef FILEDOWNLOADER_H
void download(const QString &,const QString &);
void use(const QString &);
bool printItem(const QSqlQuery &);
+ //void shellReady();a desperated attempt to get the output of my cmd, i've try Qprocess (but don't get it)
public slots:
signals:
//sax2 xml;
//QsKineticScroller * ks;
//QScrollArea * scroll;
+ //a desperated attempt to get the output of my cmd, i've try Qprocess (but don't get it)QProcess *shell;
QMediaPlayer *video;
QMediaPlaylist *playlist;
QMutex sql,updatelocker,d,Msav;