1
我正在开发一个Qt应用程序,我想知道树视图的项目是否在委托函数中展开。如何检查树视图的项目是否在委托中展开?
这里是我的树视图的委托..
void roster_item_delegate::paint(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
/* How can I know whether this item is expanded or not in here? */
}
我认为这是可能使用树视图的指针和isExpanded()函数,但我不知道我怎样才能获得委托函数指针。
谢谢。
谢谢。我解决了我的问题。 – Brian 2011-02-28 00:54:35