Important: Please read the Qt Code of Conduct -

QTextEdit Zoom Not Working after SetHTML

  • Hello,

    Guys i have i big problem, i think is coming from qt source code may be.
    when i set Html code in QTextedit, the zoom method stop working but when i use the setPlainText it's working. what do you think ??? i need setHTML in my program.

  • Lifetime Qt Champion


    Which version of Qt are you using ?
    On which OS ?
    Can you provide a minimal compilable example that shows that behaviour ?

  • Qt 5.15.0 i found the solution you need to delete the font in html style document that is generated by Qtextedit:

    text { text.remove("font-size:10pt;") };

    so if any body have the problem when you clear the qtextedit and you load a file with SetHtml the zoom method is disable.

Log in to reply