[PyQt] Feature request: support for flashing characters in QTextEdit

Edward K. Ream edreamleo at gmail.com
Tue Feb 3 17:00:00 GMT 2009


On Tue, Feb 3, 2009 at 9:29 AM, Henning Schröder <
henning.schroeder at gmail.com> wrote:

I successfully implemented parenthesis matching with
> QTextEdit.ExtraSelection.


Oh joy.

Perhaps you could give me another hint.  I'm confused by the docs at
http://doc.trolltech.com/4.4/qtextedit.html

I don't understand how to specify selection and text format for
ExtraSelection elements: the ExtraSelection class seems to have neither ctor
nor settors.

In other words, I want to do::

    e = QtGui.QTextCursor
    cursor = QtGui.QTextCursor()
    cursor.setPosition(i)
    cursor.movePosition(e.Right,e.KeepAnchor,1)
    extra = w.ExtraSelection()
    extra.setCursor(cursor) #### Doesn't work.
    w.setExtraSelections([extra])

but how do I set the attributes of extra to match cursor?

Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090203/8da98794/attachment.html


More information about the PyQt mailing list