[PyQt] Resize columns in QTreeViewv
gion at ngi.it
Wed Nov 24 20:53:57 GMT 2010
Ok, now I have this slot:
def updateFiles(self, index):
path = self.__dirModel.filePath(index)
fileIndex = self.__fileModel.index(path)
but there is ANOTHER problem!! Again!
Let this be a dirs tree:
If I select A I can see only files and this is right. Then if I select
B I can see only files again and this is right!! But then if I select A
folder again I can see files and the B folder!!!!!!!! And that is NOT
right. Note that I am applying the Files filter in the slot too, so
every time the setRootPath method is called!
Nothing has changed in the constructor except for this tow lines:
Thanks in advance for your help!!!
Il 24/11/2010 11:38, Hans Meine ha scritto:
> Op den Dingsdag 23 November 2010 Klock 18:03:15 hett Hans Meine schreven:
>> 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
> Turns out that in this case, this warning does not apply, since Gionata does
> not need the fileModel to read the directory structure (there's a separate
> pane for that). I find the "should always include" misleading in that
> PyQt mailing list PyQt at riverbankcomputing.com
More information about the PyQt