Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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.

    76ff43fe-0c58-4b79-a94a-7468cf8f71b7-image.png

    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.

    4b1402c8-1633-4b5f-ac16-02fff1f0e75b-image.png
    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