Important: Please read the Qt Code of Conduct -

How to get fit size ??

  • I am using Qt 5.4 Liunx 64 bit.

    Next is QTextEdit.
    TextEdit can decorate text.


    I want a square size that fits the written text.

    In the next picture, I want to get a rectangular area that will not have the scroll bar as much as a blue rectangular box.

    QTextEdit-> toPlainText (); I applied it to fontMatrix as text, but I can't get it.

    Is there a novel way to find the area where the scroll bar will not be created?

Log in to reply