[PyQt] Linux: Problem with QTreeView and Dot Directories

Gottfried Müller gottfried.mueller at gmx.de
Thu Jul 7 09:08:00 BST 2016


I am using Python 3.5, PyQt 5.6 and Qt 5.6 (Manjaro distribution)

You can follow the problem with the small python script in the attachment.

There is a combobox with 2 entries (Home and a dot directory in the home 
path). After the start of the example program switch to the "UserShare" 
entry of the combobox. The treeview is empty now (I hope so). When you 
go back to the "Home" entry of the combobox, you will find beside of 
other directories in your home path (maybe) still the entry ".test". The 
model filter "QDir.AllDirs | QDir.NoDotAndDotDot" should not allow 
showing this entry. All other dot directories in the home path are hidden.

Is this a feature or a bug?

Is it a problem of PyQt or Qt? I suppose it is more a problem of Qt. I 
never wrote a C++ program. So it is not easy to me coding this example 
in C++.

Gottfried

-------------- next part --------------
A non-text attachment was scrubbed...
Name: treedotdirs.py
Type: text/x-python
Size: 1977 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160707/f9356b59/attachment-0001.py>


More information about the PyQt mailing list