View Single Post
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#9
If you want to run your shell script in the button handler, you need to use function int QProcess::execute ( const QString & program, const QStringList & arguments ).

In above example from Nathraiben you would call it in function hello like this:
Code:
void MainWindow::hello()
{
    QStringList arguments;
    arguments << "Enable custom transitions" << "Droid Sans" << "Black";
    QProcess::execute("/path/to/my/script/script.sh", arguments);
}
__________________
My Maemo5 projects:
mSpede - Speed testing game | Them Bloody Ducks - 2D duck hunting game | Maetronome - A simple metronome app | CuteMPC - MPD client
 

The Following 2 Users Say Thank You to TNiga For This Useful Post: