I've implemented a standard PyQt QCompleter
within a QLineEdit
, the guts of which are:
self.cam_completer = QtGui.QCompleter( self.cameras, self )
self.cam_completer.setCaseSensitivity( 0 )
self.cam_completer.setCompletionMode( 2 )
self.CamerasSearch.setCompleter( self.cam_completer )
where self.cameras
is a list
of strings, like:
['cam0001:left', 'cam0001:right', 'cam0002:left', 'cam0002:right', etc...]
Within the QLineEdit
, entering cam
will return all items, cam0001
will return just the first 2, etc. However, when I enter cam*
, nothing is returned.
I would like to be able to glob for patterns when searching, including *
and ?
. For example, searching for cam000?:left
would eliminate cam0010:left
from the results.