to show Checkboxes in listview
hii,
this is my code....
Code:
fileTypes << "_*.dll" ;
QDir dir
("E:/qtpro/ext");
dir.setNameFilters(fileTypes);
QFileInfoList list = dir.entryInfoList();
//ui->textEdit->append("Bytes Filename");
for (int i = 0; i < list.size(); ++i)
{
//QString s= fileInfo.size();
//s.append(s1);
ui->textEdit->append(s1);*/
this displays the dll files in the directory in the textedit..
now i want to display all these dlls as checkboxes in the listview...
can any1 help me how to do this...
i had also wrote this code for adding checkboxes in listview...bt got error...
Code:
Q3ListView view(0);
view.setResizeMode( Q3ListView::LastColumn );
view.addColumn( "Filename" );
view.show();
for( QStringList::Iterator it
= files.
begin(); it
!= files.
end();
++it
) {
(void)new Q3CheckListItem ( &view, *it, Q3CheckListItem::CheckBox );
}
i got this error...:
:: error: collect2: ld returned 1 exit status
plz help..
Re: to show Checkboxes in listview
You are using Qt3Support classes.
You need to add it to your pro file:
QT += qt3support
Re: to show Checkboxes in listview
and is my code is correct..???
i had made changes in my .pro file...it worked...thanx..
it opened d application when i run it, but gave me segmentation fault...
Added after 4 minutes:
and is my code is correct..???
i had made changes in my .pro file...it worked...thanx..
it opened d application when i run it, but gave me segmentation fault...
Re: to show Checkboxes in listview
Quote:
ut gave me segmentation fault...
run it in a debugger and see which line segfaults.