[PyQt] highlightedtextedit.py
Lee Harr
missive at hotmail.com
Sun Sep 6 16:14:18 BST 2009
> Does anyone have this file from trunk or a recent snapshot:
> examples/designer/plugins/widgets/highlightedtextedit.py
Adam: thank you very much.
For anyone trying to get this working on PyQt 4.5,
here is a patch to get it working:
--- highlightedtextedit.py.orig 2009-09-06 11:10:13.000000000 -0400
+++ highlightedtextedit.py 2009-09-06 11:09:02.000000000 -0400
@@ -130,11 +130,11 @@
for expression, format in self.rules:
- index = text.indexOf(expression, start)
+ index = expression.indexIn(text, start)
while index>= start and index < finish:
length = expression.matchedLength()
self.setFormat(index, min(length, finish - index), format)
- index = text.indexOf(expression, index + length)
+ index = expression.indexIn(text, index + length)
def updateFonts(self, font):
_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx
More information about the PyQt
mailing list