hii,this is my code…I want to display all the .dll files present in a directory as checkable items in a list….how can i do this….can any 1 help me for this…
i had already done this using Q3CheckListItem….but now i want to use any new method that exist in Qt4…and dont want to use the Qt3 Support…
QStringList fileTypes;
QDir dir;
QFileInfo fileInfo;
QStringList files;
Q3CheckListItem *item;
listView->setResizeMode( Q3ListView::LastColumn );
listView->addColumn( “Extension†);
//view.show();
//ui->listView->header()->hide();
fileTypes << “_*.dll†;
dir.setPath(“E:/qtpro/extâ€);
dir.setNameFilters(fileTypes);
files = dir.entryList();
for (int i = 0; i < files.size(); ++i)
{
fileInfo = files.at(i);
item = new Q3CheckListItem(listView,QString(â€%1â€) .arg(fileInfo.fileName()),Q3CheckListItem::CheckBo x );
}
Bookmarks