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. How to resize QTextEdit when append long text?

How to resize QTextEdit when append long text?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.4k Views 1 Watching
  • 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
    Arrandale
    wrote on last edited by
    #1

    My QTextEdit now expand follow to mainwindow.
    I want to resize QTextEdit to fit long text.
    How to do that?

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Below the QTextEdit place a vertical spacer. Place both in a horizontal layout. This will make the QTextEdit increase/decrease with added/removed text and makes the size of the QTextEdit dependant of the substance. Also when MainWindow resizes, it will follow. Don't forget to set a minimumsize hint for the QTextEdit to indicate a minium size to shrink to.

      Greetz, Jeroen

      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