about QFontMetrics elidedText, sort of difficult to realize



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.