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
On Thu, Nov 18, 2010 at 11:00 AM, dizou di_...@yahoo.com 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 =
@riverbankcomputing.com
Sent: Thu, November 18, 2010 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:18 AM, Di Zou di_...@yahoo.com 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.
--
On Thu, Nov 18, 2010 at 11:18 AM, Di Zou di_...@yahoo.com 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
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
Sorry. I meant I am using a QTreeWidget and QTreeWidgetItems.
From: Reinaldo de Carvalho reinal...@gmail.com
To: Di Zou di_...@yahoo.com
Cc: pyqt@riverbankcomputing.com
Sent: Thu, November 18, 2010 9:22:37 AM
Subject: Re: [PyQt] QTreeView and sorting
On Thu
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
On Wed, Nov 17, 2010 at 1:42 PM, dizou di_...@yahoo.com 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