QTreeView类和相关类的应用记录

来源:互联网 发布:数据库增删改查小项目 编辑:程序博客网 时间:2024/06/06 09:46
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指定的项是折叠的还是展开的。
0 0
原创粉丝点击