![]() |
2010-07-16
, 13:00
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#32
|
You're welcome!
Tbh, I like your style.
Basically, you went from zero to a working application in less than half day - and we just gave you some pointers about where to look, without any copy-pasteable code.
This is quite impressive!![]()
![]() |
2010-07-16
, 13:28
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#33
|
Now I need still to figure out how to display a progressbar which covers the UI while the shell script is being excecuted (running the script takes a minute, so it's good to tell the user that "this is gonna take a while, sit back and wait).
The Following User Says Thank You to Diph For This Useful Post: | ||
![]() |
2010-07-16
, 16:57
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#34
|
When script is executed, start progress indicator. There is finished signal in QProcess. You can connect it to slot which stops progress indicator.
http://doc.qt.nokia.com/4.6/qprocess.html#finished
![]() |
2010-07-16
, 17:00
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#35
|
![]() |
2010-07-16
, 17:37
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#36
|
I haven't tried this but maybe this helps...
http://doc.qt.nokia.com/qt-maemo-4.6...essdialog.html
E: Or use QDialog with QProgressBar.
void MainWindow::on_pushButton_clicked() { QProgressDialog progress("Setting up the theme, please wait...", "Abort", 0, 1, this); progress.setWindowModality(Qt::WindowModal); progress.setValue(0); QStringList arguments; arguments << ui->Transition->currentText() << ui->Font->currentText() << ui->Color->currentText(); QProcess::execute("/sbin/myscriptlauncher", arguments); progress.setValue(1); }
![]() |
2010-07-16
, 18:11
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#37
|
The Following User Says Thank You to Diph For This Useful Post: | ||
![]() |
2010-07-16
, 18:33
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#38
|
The dialog gets destroyed before it shown (add progress.show() also). You can make the dialog member variable of MainWindow and create dialog with new and delete it when dialog is closed.
E: Or add dialog.exec();
![]() |
2010-07-16
, 19:06
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#39
|
The dialog gets destroyed before it shown (add progress.show() also). You can make the dialog member variable of MainWindow and create dialog with new and delete it when dialog is closed.
E: Or add dialog.exec();
![]() |
2010-07-16
, 19:26
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#40
|
Tbh, I like your style.
Basically, you went from zero to a working application in less than half day - and we just gave you some pointers about where to look, without any copy-pasteable code.
This is quite impressive!
You should follow me on Twitter!
Apps: Puzzle Master, IRC Chatter for Harmattan, IRC for Sailfish