<br><br><div class="gmail_quote">On Tue, Feb 3, 2009 at 9:29 AM, Henning Schröder <span dir="ltr"><<a href="mailto:henning.schroeder@gmail.com">henning.schroeder@gmail.com</a>></span> wrote:<br><div class="Ih2E3d"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I successfully implemented parenthesis matching with<br>
QTextEdit.ExtraSelection.</blockquote></div><div><br>Oh joy.<br><br>Perhaps you could give me another hint. I'm confused by the docs at <a href="http://doc.trolltech.com/4.4/qtextedit.html" target="_blank">http://doc.trolltech.com/4.4/qtextedit.html</a><br>
<br>I don't understand how to specify selection and text format for
ExtraSelection elements: the ExtraSelection class seems to have neither
ctor nor settors.<br><br>In other words, I want to do::<br><br> e = QtGui.QTextCursor<br>
cursor = QtGui.QTextCursor()<br> cursor.setPosition(i)<br> cursor.movePosition(e.Right,e.KeepAnchor,1)<br> extra = w.ExtraSelection()<br> extra.setCursor(cursor) #### Doesn't work.<br> w.setExtraSelections([extra])<br>
<br>but how do I set the attributes of extra to match cursor?<br><font color="#888888"><br>Edward</font></div></div><br>