Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Dynamic font size in QTextEdit
QtWS25 Last Chance

Dynamic font size in QTextEdit

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtextedit
1 Posts 1 Posters 613 Views
  • 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 Offline
    A Offline
    amitm02
    wrote on last edited by
    #1

    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
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved