Any example showing TextCharFormat::setProperty with UserProperty as StringList?

  • I wish to use QTextEdit widget to implement SpellCheck.
    There I wish to attach a list of suggestions to wrongly spelt words.
    I think I can

    1. prepare a StringList of such word suggestions
    2. prepare QTextFormat::UserProperty with a QVariant prepared from the above StringList
    3. prepare QTextCharFormat and setProperty as above property
    4. attach the prepared QTextCharFormat to the selected word as QTextCursor::setCharFormat(....)

    I hope, I am in right direction.
    Can anybody point me to any existing example that can help me in this?

    Thanks in advance

  • Moderators

    you may want to see this

Log in to reply