Results 1 to 2 of 2

Thread: QTableWidget font shrink on text wrap

  1. #1
    Join Date
    Feb 2014
    Posts
    12
    Thanks
    1
    Qt products
    Qt5

    Default QTableWidget font shrink on text wrap

    When QTableWidget cell content is wrapped, his font is shrinked. To avoid this behaviour, I tried this

    Qt Code:
    1. tw->setStyleSheet("font-size: 90%;");
    To copy to clipboard, switch view to plain text mode 

    With no results. Any solution?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,543
    Thanks
    13
    Thanked 1,577 Times in 1,506 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QTableWidget font shrink on text wrap

    Your screenshot does show any wrapped text. Do you mean that you would like it to wrap where it is currently elided (that is cut sho...)? If so you can look at setWordWrapped() on the view or use a custom delegate to format the cell items to your liking.

Similar Threads

  1. How to Wrap the text in QTableView
    By mythili in forum Qt Programming
    Replies: 10
    Last Post: 8th May 2013, 13:15
  2. Replies: 2
    Last Post: 9th April 2013, 06:26
  3. How to word wrap text in the rows and columns of a QTableWidget?
    By TheIndependentAquarius in forum Qt Programming
    Replies: 8
    Last Post: 6th March 2012, 08:02
  4. text indent with wrap
    By linuxsong in forum Qt Quick
    Replies: 1
    Last Post: 26th July 2011, 14:14
  5. Shrink Text
    By lamp in forum Qt Programming
    Replies: 5
    Last Post: 30th November 2010, 06:30

Tags for this Thread

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.