开发者

How to hide dotted lines in QTreeWidget

Qt. QTreeWidget. How to hide dotted li开发者_StackOverflownes?


If this indeed is about the branches (the question is not very clear), then QTreeView (and thus QTreeWidget) has a special function to do just that (since Qt 4.2):

treeWidget->setRootIsDecorated(false);


If you're talking about the branch lines on the left of the tree, try setting a stylesheet as such :

treeWidget->setStyleSheet(QString("QTreeView::branch { border-image: none; }"));


What about

treeWidget->setRowHidden(rowNumber,QModelIndex(),true);


Try strecthing the header with;

treeWidget->header()->setStretchLastSection(true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜