Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    about QFontMetrics elidedText, sort of difficult to realize

    General and Desktop
    1
    1
    346
    Loading More Posts
    • 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
      opengpu2 last edited by

      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 Reply Quote 0
      • First post
        Last post