[PySide] same Pyside app doesnt dispays result as in Ubuntu like it is working fine in Windows

šãñ niceguysan at gmail.com
Sat Jan 12 14:38:59 CET 2013


So I would really appreciate if some one can shower some kindness and tell
me whats wrong with the code I have implemented to display the drives &
folders in QTreeView on left and files on right QListView

(see attached screenshots)

here is the part of code I have

                self.dirmodel = QtGui.QFileSystemModel()
                # Don't show files, just folders
                sPath=os.path.expanduser("~")
                self.dirmodel.setRootPath(sPath)
                self.dirmodel.setFilter(QtCore.QDir.Drives |
QtCore.QDir.NoDotAndDotDot | QtCore.QDir.AllDirs)
                self.dirmodel.setIconProvider

                self.folder_view = QtGui.QTreeView(parent=self);
                self.folder_view.setRootIsDecorated(False)
                self.folder_view.setModel(self.dirmodel)

self.folder_view.clicked[QtCore.QModelIndex].connect(self.clicked)

                # Don't show columns for size, file type, and last modified
                self.folder_view.setHeaderHidden(True)
                self.folder_view.hideColumn(1)
                self.folder_view.hideColumn(2)
                self.folder_view.hideColumn(3)


                self.selectionModel = self.folder_view.selectionModel()

                self.filemodel = QtGui.QFileSystemModel()
                # Don't show folders, just files
                self.filemodel.setFilter(QtCore.QDir.NoDotAndDotDot |
QtCore.QDir.Files)

                self.file_view = QtGui.QListView(parent=self);
                self.file_view.setModel(self.filemodel)
                self.file_view.setIconSize(QtCore.QSize(225,225))  # How
come this doesnt work in Linux(Ubuntu)


I am using PySide 1.1.2 both on windows and on Ubuntu... and my experience
is quite wee and I am still learning phase...

-- 
**

[image: San's personal blog] <http://feeds.feedburner.com/SanLuthraBlog>

*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130112/08736d59/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2013-01-12 17:50:48.png
Type: image/png
Size: 91288 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130112/08736d59/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Same_PySideApp_onWindow.PNG
Type: image/png
Size: 95836 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130112/08736d59/attachment-0001.png>


More information about the PySide mailing list