[PyQt] Resize columns in QTreeViewv
Hans Meine
meine at informatik.uni-hamburg.de
Tue Nov 23 17:03:15 GMT 2010
Op den Dingsdag 23 November 2010 Klock 15:04:34 hett Gionata Boccalini
schreven:
> Ooooopssss!!! the first parameter is the milliseconds!! I thought it was
> the seconds!! Now it is working correctly! ( I know I should have looked
> the docs...)
Indeed, looking at the fine docs is often the solution...
> I'll attach the file browser class to this mail. The problem is at row
> 34, the setFilter method. I want to display only regular files in left
> widget, but the filter displays all
> the files and directory even the hidden ones!
> If you comment out that line everything is working but you get files and
> folders in the left widget!
Let me quote the docs for you:
void QFileSystemModel::setFilter ( QDir::Filters filters )
Sets the directory model's filter to that specified by filters.
*Note that the filter you set should always include the QDir::AllDirs* enum
value, otherwise QFileSystemModel won't be able to read the directory
structure.
HTH,
Hans
More information about the PyQt
mailing list