The code works fine in api v1, if i uncomment the top sip calls, then it means i'll be using v2, then of course i'll see errors like
TypeError: invalid result type from Validator.validate() i know i need to change the return value of .validate() , but if i change it to what pyqt doc says in v2 , http://pyqt.sourceforge.net/Docs/PyQt4/qvalidator.html#validate-2 ,it gives me segmentation fault ( on pyqt 4.6.1, centos 6.3 x64). why? v2 code works fine on pyqt 4.8 and 4.10 though ( tested on a fedora 19 linux and a windows 7 machine.) is this a bug or what am i missing ? thanks ! http://pastebin.com/dDeZ52gZ #!/usr/bin/env python2 # api v2 import sip sip.setapi('QString', 2) sip.setapi('QVariant', 2) from PyQt4.QtGui import * from PyQt4.QtCore import * import re,os,sys class MyQComboBox(QComboBox): def __init__(self, parent=None, listing=None): super(MyQComboBox, self).__init__(parent) if listing != None: self.listSetup(listing) def listSetup(self, listing): self.setEditable(True)
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt