[PyQt] qlistview and finditem
Milan Hemžal
milan at 3trees.cz
Tue Dec 2 06:51:54 GMT 2008
hi,
i'm learning PyQt and cannot find how create:
a=["1Test1","2Test1","3Test1","4Test1","5Test1"]
def __init__(self):
QtGui.QDialog.__init__(self)
app.connect(self.lv_find,QtCore.SIGNAL("textEdited ( const QString &
)"),self.zmena_sl)
def fill_lv(self,ss):
#empty lv
self.lv_seznam.clear()
#fille new content
for id,name, in enumerate(a):
item=QtGui.QListWidgetItem(name)
item.setData (QtCore.Qt.UserRole, QtCore.QVariant(id))
self.lv_seznam.insertItem(0,item)
def zmena_sl(self,c):
--> self.lv_seznam.findItems(c,QtCore.QtCore.MatchFlags("=")) <--
i cannot find, howto create Qt.MatchFlags
Traceback (most recent call last):
File "/home/milan/workspace/seneka/src/dlg/dlg_divadlo.py", line 67, in
zmena_sl
self.lv_seznam.findItems(c,QtCore.MatchFlags("="))
AttributeError: 'module' object has no attribute 'MatchFlags'
--
Milan Hemžal
3 Trees s.r.o.
--------------------------
Dřevěné podlahy a koupelny
Kontakt info:
GSM +420 775 393 335
www: www.3trees.cz
More information about the PyQt
mailing list