如何使QTreeWidget中的可扩展登录始终可见,即使项目确实有任何子项?以及如何绘制其他符号而不是默认符号?
先谢谢你,Serge
发布于 2010-04-15 03:24:31
QTreeWidgetItems拥有property 。允许的值包括:
你想要第一个。
theItem.setChildIndicatorPolicy(QTreeWidgetItem.ShowIndicator)发布于 2010-04-15 06:49:07
回答我的问题的第二部分。
我在QTreeView中查找了绘图函数,找到了以下内容:
void QTreeView::drawBranches ( QPainter * painter, const QRect & rect, const QModelIndex & index ) 使用此函数,您可以在每个项目的左侧绘制任何您想要的内容。
另一个很好的选择就是使用QTreeView的样式表:
http://qt.nokia.com/doc/4.6/stylesheet-examples.html#customizing-qtreeview
https://stackoverflow.com/questions/2638974
复制相似问题