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. about QFontMetrics elidedText, sort of difficult to realize
QtWS25 Last Chance

about QFontMetrics elidedText, sort of difficult to realize

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 447 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.
  • O Offline
    O Offline
    opengpu2
    wrote on last edited by
    #1

    i use QAbstractItemDelegate, and in the pain(), i draw the fileName use drawText().
    when the fileName is very very long, i want at most 4 lines are shown, and if the title is still not shown all, then ElideRight the rest.
    which means, 4 lines is the most. if still not enough, elide the rest.

    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