[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] QTextEdit, QTextCursor: make 0-len QTextBlocks invisible,
From: Denis <denis-bz-py () t-online ! de>
Date: 2009-02-26 18:24:34
Message-ID: loom.20090226T175721-45 () post ! gmane ! org
[Download RAW message or body]
Folks,
can anyone help on these 2 problems, either in PyQt or Qt C --
1) custom visible cursor in a QTextEdit, hilite a line or several lines;
mouse click / 2click / 3click ->
both the usual mac cursor hiliting, blue char / word / line
AND whatever signal cursorPosChanged triggers
2) there are extra 0-len QTextBlocks between QTextFrames,
as the picture in .../richtext-cursor.html makes clear.
Setting these invisible (setVisible(0)) doesn't work,
I still see empty lines; anyone have a workaround ?
My versions: qt-mac-opensource-src-4.4.3 PyQt-mac-gpl-4.4.4
(What I want to do is select, hilite, delete multi-line "Rec"s:
Line = QTextBlock -- wrap or chop each Line
Rec = [ Line ... ] -- a QTextFrame
Doc = [ Rec ... ]
addRec( [ str ... ])
shift mouse click -> select, hilite a multi-line Rec
deletekey -> delete it
)
An example of a tiny but real editor built on QTextEdit, using QTextCursor
(richtextlineedit.py doesn't) would *really* help.
Thanks,
cheers
-- denis
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic