qcombobox.findtext and matchflags.matchendswith

B

borntonetwork

Hi.

Using the PyQt4 library, I am trying to use the following
function("cbo" is a qtcombobox):

cbo.findText(searchStr, QtCore.MatchEndsWith)

If I don't use the "QtCore.MatchEndsWith", the function works
properly, but doesn't return partial matches ending with "searchStr".
If I use "QtCore.MatchEndsWith", I get the following error:

AttributeError: 'module' object has no attribute 'MatchEndsWith'

I've tried substituting the actual number that the enumerator
represents, which gives me a typeerror message complaining that the
argument has an invalid type.

Any suggestions?
 
P

Phil Thompson

Hi.

Using the PyQt4 library, I am trying to use the following
function("cbo" is a qtcombobox):

cbo.findText(searchStr, QtCore.MatchEndsWith)

If I don't use the "QtCore.MatchEndsWith", the function works
properly, but doesn't return partial matches ending with "searchStr".
If I use "QtCore.MatchEndsWith", I get the following error:

AttributeError: 'module' object has no attribute 'MatchEndsWith'

I've tried substituting the actual number that the enumerator
represents, which gives me a typeerror message complaining that the
argument has an invalid type.

Any suggestions?

QtCore.Qt.MatchEndsWith

Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top