[PyKDE] Cannot derive QValidator
Giovanni Bajo
rasky at develer.com
Tue Dec 6 11:12:48 GMT 2005
Hey,
there seems to be a problem inheriting QValidator:
=======================
from qt import *
app = QApplication([])
class V(QValidator):
def validate(self, index, pos):
return QValidator.Valid
v = V(None)
cb = QComboBox(None)
cb.setEditable(True)
cb.setValidator(v)
cb.show()
app.setMainWidget(cb)
qApp.exec_loop()
=======================
any time I press a key, I see:
========================
TypeError: invalid result type from V.validate()
========================
This is with PyQt 3.15, SIP 4.3.1.
--
Giovanni Bajo
More information about the PyQt
mailing list