maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   PyQt widgets and setSortingEnabled (https://talk.maemo.org/showthread.php?t=39914)

roose 2010-01-10 04:12

PyQt widgets and setSortingEnabled
 
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 ...

roose 2010-01-10 11:33

Re: PyQt widgets and setSortingEnabled
 
update: it works

but i have to hit the header field up to 30 times, seems that using
mouse at scratchbox is more precise then using pen on the device.


All times are GMT. The time now is 21:05.

vBulletin® Version 3.8.8