QTextEdit: How to create nested lists starting on level 2?
I'm desperately trying to create a QTextDocument with the following structure using the QTextCursor interface.
* level two
* level one
So basically I want the list to start one level 2 and then continue one level 1.
The problem seems to be that it is not possible to create a sub-list on an empty list-item. The following code will create a visually correct item on the second level, but the structure of QDocument shows that it is in fact still on the first level. Only indented twice.
// First level
// Second level
If anyone has ideas how to implement that, please let me know!
It looks like there is actually no way to do that with QDocument. I ended up reimplementing this behavior myself.