c++ - Hide a folder from a QFileSystemModel -
i know how hide specific folder in treeview qfilesystemmodel
.
i know can filter folders show files using setfilter
don't know how filter folder.
i want display folders except one. know name of folder can choose name.
does know how hide/remove folder list please?
the filters can use wildcards, wildcards optional. you're free use filters filter out non-wildcard name.
qstringlist filters; filters << "*.badext" << "foldername"; model->setnamefilters(filters);
if want tighter control on - example, filter out folder given name, , not file given name, need implement qsortfilterproxymodel
.
Comments
Post a Comment