QTextEdit remove list
-
@JonB I'm surprised someone hasn't thought to add this feature already.
Anyway removing and re-adding is what I'm trying now. I'm having some success.
-
I observe in QTextEdit there is a createList method, but what is its opposite?
Suppose I have a list item like so- fubar
And I want to convert that to a non-list-item paragraph.
How can I do that?@clarify said in QTextEdit remove list:
I observe in QTextEdit there is a createList method
There isn't.
There is for
QTextCursor
.At a guess, you would need to remove the blocks from the list, re-add them outside as plain paragraphs, and then remove the (now) empty list completely.
-
@clarify said in QTextEdit remove list:
I observe in QTextEdit there is a createList method
There isn't.
There is for
QTextCursor
.At a guess, you would need to remove the blocks from the list, re-add them outside as plain paragraphs, and then remove the (now) empty list completely.
-
@JonB I'm surprised someone hasn't thought to add this feature already.
Anyway removing and re-adding is what I'm trying now. I'm having some success.
-
@clarify
Just found https://stackoverflow.com/questions/69812660/how-to-reset-a-bulleted-list-to-normal-text-and-back-in-qtextedit and the Solution from 2021 confirms this approach, and perhaps gives you sample code to check yours against. -
@clarify
Just found https://stackoverflow.com/questions/69812660/how-to-reset-a-bulleted-list-to-normal-text-and-back-in-qtextedit and the Solution from 2021 confirms this approach, and perhaps gives you sample code to check yours against. -