Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Need assistance from QT programmer

    Reply
    Page 4 of 18 | Prev |   2     3   4   5     6   14 | Next | Last
    Venemo | # 31 | 2010-07-16, 11:44 | Report

    Originally Posted by D-Iivil View Post
    Thanks for you guys for the help. I know it's frustrading to teach someone who has no_idea_at_all what's happening
    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!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    d-iivil | # 32 | 2010-07-16, 13:00 | Report

    Originally Posted by Venemo View Post
    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!
    Haha, well.. it was pretty much copy-paste :P

    The application is working fine on the device and the binary is easy to put inside my theme package. 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). I already downloaded source of fapman (great app!) because it has a nice overlay effect with bouncing status indicator, but couldn't implement it yet

    To be continued later tonight...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Diph | # 33 | 2010-07-16, 13:28 | Report

    Originally Posted by D-Iivil View Post
    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).
    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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Diph For This Useful Post:
    Venemo

     
    d-iivil | # 34 | 2010-07-16, 16:57 | Report

    Originally Posted by Diph View Post
    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
    Hmm... okay, I think I understood the idea. What I don't know is how to open a same kind of "dialog window" with seeking progressbar like for example built in application manager shows when updating catalogs or installing programs.

    Allthough I don't necessarily need a progress bar, all I need is a window that covers the UI and has text that says "Please wait, setting up the theme. This may take few minutes." and the script would be executed in background. I just want to prevent user to hit the "apply settings" during the script is already running.

    Should I create another "form" in qt desinger and somehow launch that when the apply -button has been hit?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Diph | # 35 | 2010-07-16, 17:00 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Diph; 2010-07-16 at 17:02.

     
    d-iivil | # 36 | 2010-07-16, 17:37 | Report

    Originally Posted by Diph View Post
    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.
    Tried that already, but couldn't get it working. I propably misunderstood something because I cannot make the progressdialog to appear.

    I'm trying to do it like this:
    Code:
    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);
    }

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Diph | # 37 | 2010-07-16, 18:11 | Report

    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();

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Diph; 2010-07-16 at 18:28.
    The Following User Says Thank You to Diph For This Useful Post:
    d-iivil

     
    d-iivil | # 38 | 2010-07-16, 18:33 | Report

    Originally Posted by Diph View Post
    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();
    Will try, thanks again

    Edit | Forward | Quote | Quick Reply | Thanks

     
    d-iivil | # 39 | 2010-07-16, 19:06 | Report

    Originally Posted by Diph View Post
    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();
    Adding progress.show() made the dialog appear and the script is ran in the background. But; there's nothing in the dialog, just blank dialog. How could I get my text shown there also and the progress bar itself?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Diph | # 40 | 2010-07-16, 19:26 | Report

    Did you try the dialog.exec()? It should block until user closes it. QProgressDialog wants minimum and maximum values and it might be difficult to set. Set both values to 0 and the dialog only shows busy indicator.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 4 of 18 | Prev |   2     3   4   5     6   14 | Next | Last
vBulletin® Version 3.8.8
Normal Logout