Put limits with pixels[SOLVED]
I am, using html in Qt, and i want put limits in my strings for pixels, i use "mid" but the letters have diferent size, so not work very well.
sorry for my english. =)
QString originalText("very long phrase that might not fit inside the parent window, how sad.");
QString outText = fm.elidedText(originalText, Qt::ElideRight, 200)@
the 200 is the maximum width of the text. For example, outText might contain:
"very long phrase that might not fit insi..."
i can not include "QFontMetric". Its need a new version to use that? My Qt is the 4.7.4.
[[doc:QFontMetrics]] (note the 's'!) has been around for a very long time, at least since the 3.x days. So, it is there in your 4.7 version of Qt.
hehehe now i can include, i was write the rigth name, but i was drop the "gui".
thanks, is exactly what i want.