View Single Post
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#11
Originally Posted by D-Iivil View Post
Thanks for this, but how do I put the input from those select boxes as arguments?

And in which part of my project I should put these:
Code:
connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(hello()));
Code:
void MainWindow::hello()
{
    QStringList arguments;
    arguments << "Enable custom transitions" << "Droid Sans" << "Black";
    QProcess::execute("/path/to/my/script/script.sh", arguments);
}
I have these:
Forms:
- mainwindow-ui

Headers.
- mainwindow.h

Sources:
- main.cpp
- mainwindow.cpp
Put the connect inside MainWindow's constructor (function named MainWindow::MainWindow() )in mainwindow.cpp and the function hello also in same file but not inside anything. You'll probably also need to put some includes in the beginning of the file:
Code:
#include <QProcess>
#include <QStringList>
__________________
My Maemo5 projects:
mSpede - Speed testing game | Them Bloody Ducks - 2D duck hunting game | Maetronome - A simple metronome app | CuteMPC - MPD client