hi every one
i want to make my QTreeview column elide at a specific point(say after two charactors AA:...sdfsdf)
instead of eliding from middle or left.
i sub classed QStyleOptionViewItem delegate paint function with following code
case column 2:
{
const QString elided = option.fontMetrics.elidedText( this->displayText( index.data(), view ? view->locale() : QLocale() ),Qt::ElideMiddle , textRect.width());
painter->drawText(textRect, option.displayAlignment, elided);
}
what changes need to be done to get elided at a given position.
Thanks in Advance
Bookmarks