Gurpreet
21st July 2012, 12:40
Hi! Experts
I am making an application ....
Using Browse button I select path of particular directory after clicking on the start button selected path shows in line edit and the files are shown in line edit one by one instead of list widget at one go. All the file names are displayed of that directory one by one after some duration.Displaying the files shoud be similar to anti-virus scanning software.
My code for viewing in list widget is as follows...
connect(browse,SIGNAL(clicked()),this,SLOT(find()) );
void MainWindow::find()
{
QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),"/home",QFileDialog::ShowDirsOnly| QFileDialog::DontResolveSymlinks);
QDir lsdir(dir);
l->setText( dir );
lw->addItems(lsdir.entryList());
}
I am making an application ....
Using Browse button I select path of particular directory after clicking on the start button selected path shows in line edit and the files are shown in line edit one by one instead of list widget at one go. All the file names are displayed of that directory one by one after some duration.Displaying the files shoud be similar to anti-virus scanning software.
My code for viewing in list widget is as follows...
connect(browse,SIGNAL(clicked()),this,SLOT(find()) );
void MainWindow::find()
{
QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),"/home",QFileDialog::ShowDirsOnly| QFileDialog::DontResolveSymlinks);
QDir lsdir(dir);
l->setText( dir );
lw->addItems(lsdir.entryList());
}