Qt5 5.70
Qt Creator 4.1.0
Hello,
I've got a modal QDialog on top of a QMainwindow.
I start a mainwindow QProcess from the QDialog, this seems to work.
I'd like to get the value from the QMainwindow/QProcess to show on on the QDialog QProgressBar.
So far, no luck.
I'm obviously missing sommething and would appreciate some help.
Thanks in advance.
Regards
mainwinndow .cpp
void MainWindow::readyReadStandardOutput4() //slot
{
QString temp
= process
->readAllStandardOutput
();
outputList = temp.split("per");
qDebug() << outputList.at(0).toInt();
emit progressUpdate(outputList.at(0).toInt());
}
mainwinndow .hpp
signals:
void progressUpdate(int);
QDebug output:
1
2
...
...
99
100
mainwinndow .cpp
void MainWindow::readyReadStandardOutput4() //slot
{
QString temp = process->readAllStandardOutput();
outputList = temp.split("per");
qDebug() << outputList.at(0).toInt();
emit progressUpdate(outputList.at(0).toInt());
}
mainwinndow .hpp
signals:
void progressUpdate(int);
QDebug output:
1
2
...
...
99
100
To copy to clipboard, switch view to plain text mode
noobsForm .cpp
QObject::connect(&mainwindow,
SIGNAL(progressUpdate
(int)),
this, SLOT(updateProgress(int)));
void noobsForm::updateProgress(int value) //slot
{
ui->progressBar->setValue(value);
qDebug() << "value " << value;
}
noobsForm .hpp
public slots:
void updateProgress(int);
noobsForm .cpp
QObject::connect(&mainwindow, SIGNAL(progressUpdate(int)),
this, SLOT(updateProgress(int)));
void noobsForm::updateProgress(int value) //slot
{
ui->progressBar->setValue(value);
qDebug() << "value " << value;
}
noobsForm .hpp
public slots:
void updateProgress(int);
To copy to clipboard, switch view to plain text mode
Bookmarks