[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] How do I change a mixed font format?
From: bluekyu <bluekyu.dev () gmail ! com>
Date: 2012-02-21 4:43:09
Message-ID: 4F4320DD.1010205 () gmail ! com
[Download RAW message or body]
Hello. I have a problem about QTextEdit. Setting font functions of
QTextEdit do not work as those of word processor.
I want to change mixed font formats consistently.
For example, selected text is """<p
style="font-style:italic;">Text1</p><p>Text2</p>."""
I want to apply "underline" to the text, so I can use
QTextEdit.setFontUnderline().
And then, the text is """<p style="font-style:italic;
text-decoration:underline;">Text1</p><p
style="text-decoration:underline;">Text2</p>"""
However, if I use QTextEdit.setCurrentFont for "strike out", all text is
set to font of last cursor
as """<p style="text-decoration:line-through;">Text1</p><p
style="text-decoration:line-through;">Text2</p>"""
setFont* functions of QTextEdit work well, but using setCurrentFont for
unsupported function does not work as word processor.
How can I do that?
_______________________________________________
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