[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] SpinBox jam/lock
From:       Mads Ipsen <mpi () comxnet ! dk>
Date:       2009-01-30 15:05:39
Message-ID: 0940728afcc6151bcce90ef14c13c5bd () ws001a ! cxnet ! dk
[Download RAW message or body]

The following observation occurs on Linux (Ubuntu 8.04) with PyQt-4.4.4 and
qt-4.4.3.

If you connect to the valueChanged signal from a spin box, and the function
you call, take a long time before it returns, the spin box jams and does
several increments of it value. I have included a small snippet below that
reproduces this. Note, if you press ArrowUp or ArrowDown in the spin box's
line edit field, no jamming takes place. 

import sys

from PyQt4 import QtCore, QtGui

def foo(value):
    for i in range(value*100000):
        print value

if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)

    widget = QtGui.QSpinBox()
    widget.connect(widget, QtCore.SIGNAL('valueChanged(int)'), foo)

    widget.show()
    sys.exit(app.exec_())
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic