Here is some code:
delegate:
rosterItem *item = static_cast<rosterItem*> (index.internalPointer());
item->descr->setHtml( "<a href=\"http://link\">http://link</a>" );
item
->descr
->drawContents
( painter,
QRectF( 0,
(qreal
)( index.
row()*20 ),
100,
20 ) );
rosterItem *item = static_cast<rosterItem*> (index.internalPointer());
item->descr->setHtml( "<a href=\"http://link\">http://link</a>" );
item->descr->drawContents( painter, QRectF( 0,(qreal)( index.row()*20 ),100,20 ) );
To copy to clipboard, switch view to plain text mode
That's all what delegate does, it should draw link for each item but it doesn't. in list i have something like 8 items. (items with different background are "groups" in this tree view) but link is painted only ONCE. maybe it's some kind of Qt bug?
Bookmarks