Checkable list/check boxes in QTextEdit - PySide6
-
I've made a rich text editor and everything works great. Now I'm adding more functions to it like lists, which was done with QTextListFormat . But I'm yet to figure out how to implement a check list. It seems QTextList doesn't have something like that and cannot figure out how to implement it.
Is there a way to insert markdown?
Is it possible to add checkable list in QTextEdit?
Thank You.
-
I tried taking the current html of the editor and and adding markdown code to it and set the new string to the editor as markdown. Something like the following:
editor.setMarkdown(self.ed.toMarkdown() + "- [ ] check")
This works as intended but obviously, processing the whole string every time you need check box is not efficient.