Re: [PyQt] refreshing QTreeView

2010-11-18 Thread James Polk
...well in a burst of inspiration, or was that the caffeine,...I hit upon something that worksessentially bypassing the middleman, so to speak...instead of calling  addMail(),...I just do what addMail does/ did before... So, now,..my code snippet looks like this def addNewRecord(self):     p

Re: [PyQt] refreshing QTreeView

2010-11-18 Thread James Polk
test ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] refreshing QTreeView

2010-11-18 Thread James Polk
Good Day to All, Been writing code for years, but still a bit green when it comes to PyQt, so please forgive my syntactically lacking question(s) ;-) I'm hacking a derivative of the (famous?) packaged example that comes with PyQt4 (and Qt), namely "basicsortfiltermodel.pyw" from "../examples/item

Re: [PyQt] QTreeView and sorting

2010-11-18 Thread Di Zou
Sorry. I meant I am using a QTreeWidget and QTreeWidgetItems. From: Reinaldo de Carvalho To: Di Zou Cc: pyqt@riverbankcomputing.com Sent: Thu, November 18, 2010 9:22:37 AM Subject: Re: [PyQt] QTreeView and sorting On Thu, Nov 18, 2010 at 11:18 AM, Di Zou wro

Re: [PyQt] QTreeView and sorting

2010-11-18 Thread Hans Meine
Op den Middeweken 17 November 2010 Klock 17:42:20 hett dizou schreven: > I am using a QTreeView and I have sorting enabled. Sorting works great, but > I want one column to be sorted a specific way that isn't how Qt does it by > default. I took a look at QSortFilterProxyModel, but this class looks m

Re: [PyQt] QTreeView and sorting

2010-11-18 Thread Reinaldo de Carvalho
On Thu, Nov 18, 2010 at 11:18 AM, Di Zou wrote: > There is no QListViewItem, so I used QListWidgetItem. I cannot insert those > into my QTreeView though and I am not going to turn my QTreeView into a > QListView. > Sorry, QListViewItem is a QT3 object. -- Reinaldo de Carvalho http://korreio.sf.

Re: [PyQt] QTreeView and sorting

2010-11-18 Thread Reinaldo de Carvalho
On Thu, Nov 18, 2010 at 11:18 AM, Di Zou wrote: > There is no QListViewItem, so I used QListWidgetItem. I cannot insert those > into my QTreeView though and I am not going to turn my QTreeView into a > QListView. > You said 'I am using a QTreeView'. Check the first message. -- Reinaldo de Car

Re: [PyQt] QTreeView and sorting

2010-11-18 Thread Di Zou
There is no QListViewItem, so I used QListWidgetItem. I cannot insert those into my QTreeView though and I am not going to turn my QTreeView into a QListView. From: Reinaldo de Carvalho To: dizou Cc: pyqt@riverbankcomputing.com Sent: Thu, November 18, 2010 9

Re: [PyQt] QTreeView and sorting

2010-11-18 Thread Reinaldo de Carvalho
On Thu, Nov 18, 2010 at 11:00 AM, dizou wrote: > > So this is what I did: > > class TreeWidget(QTreeWidgetItem): >    def __init__(self, parent=None): >        QTreeWidgetItem.__init__(self, parent) >    def key(self, col, asc): >        print col >        if col == 4: >            path = self.tex

Re: [PyQt] QTreeView and sorting

2010-11-18 Thread dizou
So this is what I did: class TreeWidget(QTreeWidgetItem): def __init__(self, parent=None): QTreeWidgetItem.__init__(self, parent) def key(self, col, asc): print col if col == 4: path = self.text(col).latin1() if path is not None and path.fin