<br><br><div class="gmail_quote">On Tue, Feb 3, 2009 at 9:29 AM, Henning Schröder <span dir="ltr">&lt;<a href="mailto:henning.schroeder@gmail.com">henning.schroeder@gmail.com</a>&gt;</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.&nbsp; I&#39;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&#39;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>&nbsp;&nbsp;&nbsp; e = QtGui.QTextCursor<br>
&nbsp;&nbsp;&nbsp; cursor = QtGui.QTextCursor()<br>&nbsp;&nbsp;&nbsp; cursor.setPosition(i)<br>&nbsp;&nbsp;&nbsp; cursor.movePosition(e.Right,e.KeepAnchor,1)<br>&nbsp;&nbsp;&nbsp; extra = w.ExtraSelection()<br>&nbsp;&nbsp;&nbsp; extra.setCursor(cursor) #### Doesn&#39;t work.<br>&nbsp;&nbsp;&nbsp; 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>