Results 1 to 2 of 2

Thread: how to adjust the text browser size dynamically while displaying a file in a window?

  1. #1
    Join Date
    Oct 2011
    Posts
    160
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default how to adjust the text browser size dynamically while displaying a file in a window?

    Hi,
    I'm trying to displaying a file content in a window using textBrowser, but i'm not able to display properly....Single line is splitting into two lines and unable to view the file contents properly...how can i adjust the textBrowser size dynamically? it has to set depending on file content..

  2. #2
    Join Date
    Oct 2011
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to adjust the text browser size dynamically while displaying a file in a wind

    Perhaps you could define a slot that uses the resize() or setGeomtry functions, and trigger it with the textChanged signal...but you would need some way to pass the number of characters or something if you want to change the widget size precisely.

    Alternatively, if you just want to control how the text is wrapping without changing the size of the widget, you could take a look at changing the LineWrapMode property.

Similar Threads

  1. Replies: 1
    Last Post: 15th August 2011, 19:17
  2. adjust menu order dynamically
    By stella1016 in forum Qt Programming
    Replies: 2
    Last Post: 20th June 2011, 12:37
  3. Replies: 3
    Last Post: 11th May 2011, 19:57
  4. adjust path thickness dynamically
    By edwardc in forum Qt Programming
    Replies: 0
    Last Post: 2nd October 2010, 05:26
  5. displaying Text in QTAble dynamically
    By raghvendramisra in forum Qt Programming
    Replies: 8
    Last Post: 31st August 2007, 11:47

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.