Important: Please read the Qt Code of Conduct -

QTextDocument and QTextFormat::UserProperty

  • I need to set custom property for text, and store it into HTML for future use.
    If i make
    QTextCursor c = document->textCursor();
    QTextCharFormat bf = c.charFormat();
    bf.setProperty(QTextFormat::UserProperty + 1,"MyPropertyValue");

    it works only for this document, but does not store MyPropertyValue to HTML code.
    How can i save my properties in HTML?

Log in to reply