[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] QTableItem createEditor inheritance?
From: Mike Meyer <mwm () mired ! org>
Date: 2003-03-29 18:37:09
[Download RAW message or body]
I'm trying to create an item in a QTable that uses the
QDoubleValidator on the input edit field. The only way I can see to do
this is subclass QTableItem, and override createEditor with a method
that sets the validator, like so:
class Float_Field(QTableItem):
def __init__(self, table, data):
print "Creating float field."
QTableItem.__init__(self, table, QTableItem.OnTyping, str(data))
def createEditor(self):
print "createEditor"
editor = QLineEdit(self.text(), self.table().viewport())
self.connect(editor, SIGNAL("textChanged(QString &)"),
self.table(), SLOT("doValueChanged"))
editor.setValidator(QDoubleValidator(self))
return editor
While I get the output from __init__, I never see the output from
createEditor. Any help would be appreciated.
Thanks,
<mike
--
Mike Meyer <mwm@mired.org> http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
_______________________________________________
PyKDE mailing list PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic