Re: [PyQt] QTreeView DragDropMode (Code attached)

2012-04-26 Thread hosscomp
This is a zip file of the Exlipse project if anyone cares to take a look. At this point I am trying to figure out why the dragEnterEvent in compassTreeView.py doesn't cause a move action when source is self. http://python.6.n6.nabble.com/file/n4931964/CompassGui.zip CompassGui.zip -- View this m

Re: [PyQt] QTreeView DragDropMode (Copy vs. Move)

2012-04-24 Thread hosscomp
No problem, Bart. Thanks for replying. I think I am on the right track (a right track) now. There seems to be many different ways to do what I am trying to accomplish, but I haven't gotten the hang of quickly figuring out the documentation and I am running out of time on this project. I think it w

Re: [PyQt] QTreeView DragDropMode (Copy vs. Move)

2012-04-19 Thread hosscomp
More progress. I now have the two MineData types working so that a node dropped into the target tree is created with a different MIME_TYPE and in the dopMimeData method of the target model I have at the bottom: . . . if (mimedata.hasFormat('target_type')): self.removeRow(row,parentIndex) It d

Re: [PyQt] QTreeView DragDropMode (Copy vs. Move)

2012-04-17 Thread hosscomp
I may be talking to myself only, but I am getting closer. I subclassed two models with different MimeData subclasses of QMimeData giving them different MIME_TYPE strings. I created two instances of QTreeView, one with each of the models. One of the models (say model B) is set to accept both of the

Re: [PyQt] QTreeView DragDropMode (Copy vs. Move)

2012-04-10 Thread hosscomp
hosscomp wrote > > > hosscomp wrote >> >> I am looking at the documentation for QAbstractItemView Class. I have >> created a tree view and I would like it to accept drops from a different >> view, but also be able to move items within itself. None of the

Re: [PyQt] QTreeView DragDropMode (Copy vs. Move)

2012-04-04 Thread hosscomp
hosscomp wrote > > I am looking at the documentation for QAbstractItemView Class. I have > created a tree view and I would like it to accept drops from a different > view, but also be able to move items within itself. None of the > DragDropMode settings seem to allow that.

Re: [PyQt] PyQt Drag and Drop

2012-03-27 Thread hosscomp
I solved it. I had left out the "from cPicke import ..." line in the new file. I would have expected to get an undefined on those functions, but I guess they exist somewhere else. -- View this message in context: http://python.6.n6.nabble.com/PyQt-Drag-and-Drop-tp4646202p4661198.html Sent from

Re: [PyQt] File Filtering using QFileSystemModel & QTreeView

2012-03-09 Thread hosscomp
JPolk wrote > > hey guys, > I've read all the documentation and for the life of me, I can't find > the > solution to initiate simple file filtering (by extension) in > QFileSystemModel, > and/or using QDirModel / QDir... > > Here's my code: > > # -- >