Results 1 to 2 of 2

Thread: QTextEdit' height should adapt to the text size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QTextEdit' height should adapt to the text size

    Hi all!

    I want to display a couple of QTextEdits in a a vertical layout. The lenght of the text is various and so the height of the QTextEdit should be various.
    I changed lots of parameters(maximum size, minimum size, size policies), but I don't get the desired effect.

    Can u give me a Hint??

    thanks

  2. #2
    Join Date
    Apr 2009
    Location
    Italy
    Posts
    70
    Thanks
    23
    Thanked 15 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTextEdit' height should adapt to the text size

    If the text is read-only you can try a QLabel with word wrap = true

  3. The following user says thank you to mattc for this useful post:

    Qiieha (31st October 2011)

Similar Threads

  1. QTextEdit text size
    By Tiansen in forum Qt Programming
    Replies: 15
    Last Post: 29th October 2010, 11:56
  2. Replies: 0
    Last Post: 12th January 2010, 18:27
  3. Replies: 12
    Last Post: 30th May 2009, 14:29
  4. Replies: 2
    Last Post: 24th January 2009, 18:30
  5. QTextEdit height using Qt3.3.5
    By vermarajeev in forum Qt Programming
    Replies: 3
    Last Post: 15th December 2006, 08:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.