Important: Please read the Qt Code of Conduct -

How to "reset" indent if I remove a QTextList

  • Hello,
    I write at the moment a HTML Editor based on QTextEdit and at the moment I have some problems with a list.
    I create a QTextlist with:


    I want that only the list format is removed. So that the text looks exactly before I inserted the list.
    I remove the list with:


    After I did that the list format is correctly removed but the indent is still 1 instead of zero.
    I tried then to manually set the indent to 0 with these functions but it didn't work:


    Does anybody has an idea how to correctly change the indent after removing the QTextList.

Log in to reply