View Single Post
Posts: 23 | Thanked: 4 times | Joined on Dec 2009
#1
Hello,

i started porting some of my pyqt apps to maemo.

Unfortunately "setSortingEnabled" is not working for me:

Code:
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *

class MeinDialog(QTreeWidget):
    def __init__(self):
        QTreeWidget.__init__(self)
        self.setColumnCount(1)
        items = []
        for i in range(10):
            items.append(QTreeWidgetItem(None, QStringList(QString("item: %1").arg(i))))
        self.addTopLevelItems(items)
        self.setSortingEnabled(True)

app = QApplication(sys.argv)
dialog = MeinDialog()
dialog.show()
sys.exit(app.exec_())
same with qtreeview sorting

any idea?

PS: it works at scratchbox but not on my device ...

Last edited by roose; 2010-01-10 at 05:05.