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
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
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.
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
9:07:13 AM
Subject: Re: [PyQt] QTreeView and sorting
I said 'QListViewItem' reimplemented as 'QListViewItemXX', but you
must insert items with 'QListViewItemXX' on 'QTreeView'.
--
Reinaldo de Carvalho
http://korreio.sf.net
http://python-cyrus.sf.net
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
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
On Wed, Nov 17, 2010 at 1:42 PM, dizou wrote:
>
> 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 more
> like a way to so
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 more
like a way to sort and filter data before the data is displayed in the
t