NewFolder
21st March 2010, 23:01
Hello guys,
I want to know how to run shell commands within Qt. This is my first application:
http://i44.tinypic.com/ejy7ig.png
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());
}
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
So, can anyone help me? Thanks.
PS: I use Ubuntu Linux.
I want to know how to run shell commands within Qt. This is my first application:
http://i44.tinypic.com/ejy7ig.png
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());
}
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
So, can anyone help me? Thanks.
PS: I use Ubuntu Linux.