Qt中文手册 之 QTreeWidgetItem

头文件:#include <QTreeWidgetItem>

成员函数

1、QTreeWidgetItem::QTreeWidgetItem(int type = Type)

    使用类型type构造项,默认类型窗口类型

2、QTreeWidgetItem::QTreeWidgetItem(const QStringList & strings, int type = Type)

   使用字符串列表strings作为项的每一列,构造该项

3、QTreeWidgetItem::QTreeWidgetItem(QTreeWidget * parent,int type = Type)

    指定父类(一个树窗口),构造项

4、QTreeWidgetItem::QTreeWidgetItem(QTreeWidget * parent, constQStringList & strings, int type = Type)

  参见2与3

5、QTreeWidgetItem::QTreeWidgetItem(QTreeWidget * parent,QTreeWidgetItem * preceding, int type = Type)

在preceding项后插入该项

6、QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem * parent,int type = Type)

将项parent作为父对象,构造该项

7、QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem * parent, constQStringList & strings, int type = Type)

参见2与6

8、QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem * parent,QTreeWidgetItem * preceding, int type = Type)

  将项parent作为父对象,并在项preceding后插入

9、QTreeWidgetItem::QTreeWidgetItem(const QTreeWidgetItem & other)

    复制一个项,注意:类型type()和treeWidget()不复制

10、void QTreeWidgetItem::addChild(QTreeWidgetItem * child)

  添加子项

11、void QTreeWidgetItem::addChildren(constQList<QTreeWidgetItem *> & children)

添加子项队列

12、QBrush QTreeWidgetItem::background(int column) const

  设置项的背景色

13、Qt::CheckState QTreeWidgetItem::checkState(int column) const

   返回项中第column的被点击状态:点击Qt::Checked、没有点击Qt::Unchecked、部分点击Qt::PartiallyChecked

14、QTreeWidgetItem * QTreeWidgetItem::child(int index) const

   返回项的子项中索引为index的子项

15、int QTreeWidgetItem::childCount() const

   返回项的子项的数量

 

16、QTreeWidgetItem::ChildIndicatorPolicy QTreeWidgetItem::childIndicatorPolicy() const

      返回项中子项在折叠和打开时的策略。

QTreeWidgetItem::ShowIndicator 0 The controls for expanding and collapsing will be shown for this item even if there are no children.
QTreeWidgetItem::DontShowIndicator 1 The controls for expanding and collapsing will never be shown even if there are children. If the node is forced open the user will not be able to expand or collapse the item.
QTreeWidgetItem::DontShowIndicatorWhenChildless</
  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值