PyQt6 Not toggling "bold" text.
Ovid
curtis.poe at gmail.com
Fri Jan 26 11:54:18 GMT 2024
On Fri, Jan 26, 2024 at 12:05 PM Charles <peacech at gmail.com> wrote:
> Hi,
>
> Other than Google and AI, searching code in github is also an alternative:
> searching for mergeCharFormat yields
>
>
> https://github.com/kovidgoyal/calibre/blob/07f988b109627bdbb88ab4b43ccfa6956276c682/src/calibre/gui2/comments_editor.py#L465
>
> From the look of it, your code is missing
> `self.textEditor.setTextCursor(...)` because `textCursor()` returns a copy.
>
>>
Hi Charles,
I gave that a try:
cursor = self.textEditor.textCursor()
cursor.setCharFormat(fmt)
self.textEditor.setTextCursor(cursor)
Sadly, it did not change the behavior. Thanks for the reply, though!
Best,
Ovid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240126/12874a9a/attachment.htm>
More information about the PyQt
mailing list