Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Dynamic font size in QTextEdit

    General and Desktop
    qtextedit
    1
    1
    536
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      amitm02 last edited by

      I have a document in HTML format. The fonts are specified in 'pt' units (e.g 14pt). I also have page width specification (e.g 400pt), so when the text line is longer than 400, it will wrap to the next line.

      I would like the appeared font size in QTextEdit to match the window widget size. Such that if I make the window smaller, the fonts will get smaller. If i make the window bigger, the appeared fonts will get bigger. In any case, the line will break at the exact same place. Similar to the editing experience in Pages or Word.

      What is the best way to accomplish that?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post