Hello guys,
I want to know how to run shell commands within Qt. This is my first application:

I want to find a File using file name and file location. But how can I do that? I try to do this:
void Dialog
::on_lineEdit_textEdited(QString ) {
}
void Dialog
::on_lineEdit_2_textEdited(QString ) {
}
void Dialog::on_pushButton_clicked()
{
QString strText
= QString("find ./%1 -name \'%2\' | zenity --text-info --title \'Find Files\'").
arg(lineEdit.
text()).
arg(lineEdit_2.
text());
}
void Dialog::on_lineEdit_textEdited(QString )
{
}
void Dialog::on_lineEdit_2_textEdited(QString )
{
}
void Dialog::on_pushButton_clicked()
{
QString strText = QString("find ./%1 -name \'%2\' | zenity --text-info --title \'Find Files\'").arg(lineEdit.text()).arg(lineEdit_2.text());
}
To copy to clipboard, switch view to plain text mode
But it doesn't work:
/home/tonto/Desktop/FindFiles/dialog.cpp:22: error: ‘lineEdit’ was not declared in this scope
/home/tonto/Desktop/FindFiles/dialog.cpp:22: error: ‘lineEdit_2’ was not declared in this scope
/home/tonto/Desktop/FindFiles/dialog.cpp:22: error: ‘lineEdit’ was not declared in this scope
/home/tonto/Desktop/FindFiles/dialog.cpp:22: error: ‘lineEdit_2’ was not declared in this scope
To copy to clipboard, switch view to plain text mode
So, can anyone help me? Thanks.
PS: I use Ubuntu Linux.
Bookmarks