您的位置:首页 > 编程语言 > Qt开发

QTreeView类和相关类的应用记录

2015-10-16 10:31 417 查看
void QTreeView::resizeColumnToContents(int column)
// Resizes the column given to the size of its contents.
// 将指定列宽度适应现在的文字内容显示。


void QTreeView::setColumnWidth(int column, int width)
// Sets the width of the given column to the width specified.
// 设置指定列宽度。


void QStandardItemModel::setHorizontalHeaderLabels(const QStringList & labels)
// Sets the horizontal header labels using labels.
// If necessary, the column count is increased to the size of labels.


void QStandardItemModel::clear();
// Removes all items (including header items) from the model
// and sets the number of rows and columns to zero.
// 删除所有数据,并且设置行列数为0。


void QStandardItem::insertRow(int row, const QList<QStandardItem *> & items)
// Inserts a row at row containing items.
// If necessary, the column count is increased to the size of items.
// 插入一条数据。


void QTreeView::setExpanded(const QModelIndex & index, bool expanded)
// Sets the item referred to by index to either collapse or expanded,
// depending on the value of expanded.
// 设置index指定的项是折叠的还是展开的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: