• PySide 模块
  • PySide.QtGui
  • 内容表

    上一话题

    QTableWidget

    下一话题

    QListView

    QColumnView

    概要

    虚函数

    信号

    详细描述

    PySide.QtGui.QColumnView class provides a model/view implementation of a column view.

    PySide.QtGui.QColumnView displays a model in a number of QListViews, one for each hierarchy in the tree. This is sometimes referred to as a cascading list.

    PySide.QtGui.QColumnView class is one of the 模型/视图类 且属于 Qt 的 模型/视图框架 .

    PySide.QtGui.QColumnView implements the interfaces defined by the PySide.QtGui.QAbstractItemView 类以允许它显示提供数据,通过模型派生自 PySide.QtCore.QAbstractItemModel 类。

    ../../_images/qcolumnview.png

    另请参阅

    模型/视图编程

    class PySide.QtGui. QColumnView ( [ parent=None ] )
    参数: parent PySide.QtGui.QWidget

    Constructs a column view with a parent 来表示模型数据。使用 PySide.QtGui.QColumnView.setModel() to set the model.

    PySide.QtGui.QColumnView. columnWidths ( )
    返回类型:

    Returns a list of the width of all the columns in this view.

    PySide.QtGui.QColumnView. createColumn ( rootIndex )
    参数: rootIndex PySide.QtCore.QModelIndex
    返回类型: PySide.QtGui.QAbstractItemView

    To use a custom widget for the final column when you select an item overload this function and return a widget. index is the root index that will be assigned to the view.

    Return the new view. PySide.QtGui.QColumnView will automatically take ownership of the widget.

    PySide.QtGui.QColumnView. initializeColumn ( column )
    参数: column PySide.QtGui.QAbstractItemView

    Copies the behavior and options of the column view and applies them to the column such as the PySide.QtGui.QAbstractItemView.iconSize() , PySide.QtGui.QAbstractItemView.textElideMode() and PySide.QtGui.QAbstractItemView.alternatingRowColors() . This can be useful when reimplementing PySide.QtGui.QColumnView.createColumn() .

    PySide.QtGui.QColumnView. previewWidget ( )
    返回类型: PySide.QtGui.QWidget

    Returns the preview widget, or 0 if there is none.

    PySide.QtGui.QColumnView. resizeGripsVisible ( )
    返回类型: PySide.QtCore.bool

    This property holds the way to specify if the list views gets resize grips or not.

    默认情况下, visible is set to true

    另请参阅

    PySide.QtGui.QColumnView.setRootIndex()

    PySide.QtGui.QColumnView. setColumnWidths ( list )
    参数: list
    PySide.QtGui.QColumnView. setPreviewWidget ( widget )
    参数: widget PySide.QtGui.QWidget

    Sets the preview widget .

    widget becomes a child of the column view, and will be destroyed when the column area is deleted or when a new widget is set.

    PySide.QtGui.QColumnView. setResizeGripsVisible ( visible )
    参数: visible PySide.QtCore.bool

    This property holds the way to specify if the list views gets resize grips or not.

    默认情况下, visible is set to true

    另请参阅

    PySide.QtGui.QColumnView.setRootIndex()

    PySide.QtGui.QColumnView. updatePreviewWidget ( index )
    参数: index PySide.QtCore.QModelIndex