Re: [Maya-Python] Customized display of files/folders in a QTreeView that is using QFileSystemModel.

2019-06-16 Thread Justin Israel
On Mon, Jun 17, 2019 at 4:08 PM HarshadB wrote: > Makes sense. > I was mistakenly trying to use insertRow for the virtual row. I do intend > for the sourceModel to be read-only. > Appreciate the links, I am reading through them though it's a bit > difficult for me. > > I also got that one can us

Re: [Maya-Python] Customized display of files/folders in a QTreeView that is using QFileSystemModel.

2019-06-16 Thread HarshadB
Makes sense. I was mistakenly trying to use insertRow for the virtual row. I do intend for the sourceModel to be read-only. Appreciate the links, I am reading through them though it's a bit difficult for me. I also got that one can use the data method to write the filename for the virtual row

Re: [Maya-Python] Customized display of files/folders in a QTreeView that is using QFileSystemModel.

2019-06-14 Thread Justin Israel
If your model is read-only, then it will be a lot less work and you don't need to implement insertRow(). I can try to put together a simplified example of my own implementation when I get back to work. It's a grouping proxy model that is meant to take a table model and create a tree model with a vi

Re: [Maya-Python] Customized display of files/folders in a QTreeView that is using QFileSystemModel.

2019-06-14 Thread HarshadB
Hi Justin, Thank you for the insight. It helped to know that theoretically I am going in the right direction. I tried quite a bit of things these last few days, a bit of a struggle since I am a bit new to the syntax and structure of Qt. At this point, I am stuck on adding an extra row using the

Re: [Maya-Python] Customized display of files/folders in a QTreeView that is using QFileSystemModel.

2019-06-10 Thread Justin Israel
On Mon, Jun 10, 2019, 8:22 PM HarshadB wrote: > Need some help and direction in understanding QSortFilterProxyModel. I am > creating a tool in Maya using PySide2 (Qt.py). > > *GOAL:* > I have already built a filebrowser QTreeView with a QFileSystemModel. > Folders and files are both displayed. >

[Maya-Python] Customized display of files/folders in a QTreeView that is using QFileSystemModel.

2019-06-10 Thread HarshadB
Need some help and direction in understanding QSortFilterProxyModel. I am creating a tool in Maya using PySide2 (Qt.py). *GOAL:* I have already built a filebrowser QTreeView with a QFileSystemModel. Folders and files are both displayed. I have a filter for files with a certain extension on the s