Is there a way to query if the text in a QLineEdit is truncated?



  • Hi,

    I need to show tooltips differently depending on whether the text in a QLineEdit is shown fully or truncated. Is there a way to tell from the outside which is the case?

    Thanks!

    Mirko.



  • I know of no other way than to use QFontMetrics with the font and text of the QTextEdit to get the size, and compare that to the size of the line edit's usable area for showing content.



  • Hm, this hack is exactly what I was trying not to do. It might work, though.

    Thanks, Andre!


Log in to reply
 

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