QHeaderView Class Reference

[QtGui module]

该QHeaderView类提供了一个标题行或项目的意见标题列。More…

继承QAbstractItemView

Types

  • enum ResizeMode { Interactive, Fixed, Stretch, ResizeToContents, Custom }

Methods

  • __init__ (self, Qt.Orientation orientation, QWidget parent = None)
  • bool cascadingSectionResizes (self)
  • int count (self)
  • currentChanged (self, QModelIndex current, QModelIndex old)
  • dataChanged (self, QModelIndex topLeft, QModelIndex bottomRight)
  • Qt.Alignment defaultAlignment (self)
  • int defaultSectionSize (self)
  • bool event (self, QEvent e)
  • headerDataChanged (self, Qt.Orientation orientation, int logicalFirst, int logicalLast)
  • int hiddenSectionCount (self)
  • hideSection (self, int alogicalIndex)
  • bool highlightSections (self)
  • int horizontalOffset (self)
  • QModelIndex indexAt (self, QPoint p)
  • initialize (self)
  • initializeSections (self)
  • initializeSections (self, int start, int end)
  • initStyleOption (self, QStyleOptionHeader option)
  • bool isClickable (self)
  • bool isIndexHidden (self, QModelIndex index)
  • bool isMovable (self)
  • bool isSectionHidden (self, int logicalIndex)
  • bool isSortIndicatorShown (self)
  • int length (self)
  • int logicalIndex (self, int visualIndex)
  • int logicalIndexAt (self, int position)
  • int logicalIndexAt (self, int ax, int ay)
  • int logicalIndexAt (self, QPoint apos)
  • int minimumSectionSize (self)
  • mouseDoubleClickEvent (self, QMouseEvent e)
  • mouseMoveEvent (self, QMouseEvent e)
  • mousePressEvent (self, QMouseEvent e)
  • mouseReleaseEvent (self, QMouseEvent e)
  • QModelIndex moveCursor (self, QAbstractItemView.CursorAction, Qt.KeyboardModifiers)
  • moveSection (self, int from, int to)
  • int offset (self)
  • Qt.Orientation orientation (self)
  • paintEvent (self, QPaintEvent e)
  • paintSection (self, QPainter painter, QRect rect, int logicalIndex)
  • reset (self)
  • ResizeMode resizeMode (self, int logicalIndex)
  • resizeSection (self, int logicalIndex, int size)
  • resizeSections (self)
  • resizeSections (self, ResizeMode mode)
  • bool restoreState (self, QByteArray state)
  • rowsInserted (self, QModelIndex parent, int start, int end)
  • QByteArray saveState (self)
  • scrollContentsBy (self, int dx, int dy)
  • scrollTo (self, QModelIndex index, QAbstractItemView.ScrollHint hint)
  • int sectionPosition (self, int logicalIndex)
  • sectionsAboutToBeRemoved (self, QModelIndex parent, int logicalFirst, int logicalLast)
  • bool sectionsHidden (self)
  • sectionsInserted (self, QModelIndex parent, int logicalFirst, int logicalLast)
  • int sectionSize (self, int logicalIndex)
  • QSize sectionSizeFromContents (self, int logicalIndex)
  • int sectionSizeHint (self, int logicalIndex)
  • bool sectionsMoved (self)
  • int sectionViewportPosition (self, int logicalIndex)
  • setCascadingSectionResizes (self, bool enable)
  • setClickable (self, bool clickable)
  • setDefaultAlignment (self, Qt.Alignment alignment)
  • setDefaultSectionSize (self, int size)
  • setHighlightSections (self, bool highlight)
  • setMinimumSectionSize (self, int size)
  • setModel (self, QAbstractItemModel model)
  • setMovable (self, bool movable)
  • setOffset (self, int offset)
  • setOffsetToLastSection (self)
  • setOffsetToSectionPosition (self, int visualIndex)
  • setResizeMode (self, ResizeMode mode)
  • setResizeMode (self, int logicalIndex, ResizeMode mode)
  • setSectionHidden (self, int logicalIndex, bool hide)
  • setSelection (self, QRect, QItemSelectionModel.SelectionFlags)
  • setSortIndicator (self, int logicalIndex, Qt.SortOrder order)
  • setSortIndicatorShown (self, bool show)
  • setStretchLastSection (self, bool stretch)
  • showSection (self, int alogicalIndex)
  • QSize sizeHint (self)
  • Qt.SortOrder sortIndicatorOrder (self)
  • int sortIndicatorSection (self)
  • bool stretchLastSection (self)
  • int stretchSectionCount (self)
  • swapSections (self, int first, int second)
  • updateGeometries (self)
  • updateSection (self, int logicalIndex)
  • int verticalOffset (self)
  • bool viewportEvent (self, QEvent e)
  • int visualIndex (self, int logicalIndex)
  • int visualIndexAt (self, int position)
  • QRect visualRect (self, QModelIndex index)
  • QRegion visualRegionForSelection (self, QItemSelection selection)

Special Methods

  • __len__ (self)

Qt Signals

  • void geometriesChanged ()
  • void sectionAutoResize (int,QHeaderView::ResizeMode)
  • void sectionClicked (int)
  • void sectionCountChanged (int,int)
  • void sectionDoubleClicked (int)
  • void sectionEntered (int)
  • void sectionHandleDoubleClicked (int)
  • void sectionMoved (int,int,int)
  • void sectionPressed (int)
  • void sectionResized (int,int,int)
  • void sortIndicatorChanged (int,Qt::SortOrder)

Detailed Description

该QHeaderView类提供了一个标题行或项目的意见标题列。

一个QHeaderView显示在项目的意见,如使用的头QTableViewQTreeView类。它需要Qt3的的地点QHeader级以前用于同样的目的,但使用Qt的模型/视图架构与项目视图类的一致性。

该QHeaderView类是一个Model/View Classes并且是Qt的一部分model/view framework

从模型中使用的报头获取的每个部分中的数据的QAbstractItemModel.headerData()函数。您可以通过使用数据集QAbstractItemModel.setHeaderData( ) 。

每个头都有一个orientation()和若干节,由给定的count()函数。甲部分指的是报头的一部分 - 要么一排或一列,取决于方位。

部分可以移动和调整大小使用moveSection()和resizeSection() ,它们也可以被隐藏,以示hideSection()和showSection( ) 。

报头的每个部分是由一个段的ID ,则其部分(指定的)中描述,并且可以位于特定的visualIndex()的报头。 A节可以有一个排序的指标设置setSortIndicator();这表明无论是在相关的项目视图中的项目将在由部分给定的顺序进行排序。

对于一个水平标头中的部分等效于在模型中的一列,并为一个垂直头中的部分等效于一个行中的模型。

Moving Header Sections

一个头可以固定在适当位置,或做成可移动的带setMovable( ) 。它可以制成可点击与setClickable() ,并调整大小按照行为setResizeMode( ) 。

Note:上一个头要调整部分双击仅适用于可见行。

一个头会发出sectionMoved()如果用户移动部分,sectionResized()如果用户调整一个部分,sectionClicked()以及sectionHandleDoubleClicked( )响应鼠标点击。一个头也会放出sectionCountChanged()和sectionAutoResize( ) 。

您可以使用识别部分logicalIndex()和logicalIndexAt( )函数,或者通过其索引位置,使用visualIndex()和visualIndexAt()函数。视觉索引会改变,如果一个部分被移动,但逻辑索引不会改变。

Appearance

QTableWidgetQTableView创建默认标题。如果你想标题是可见的,你可以使用setVisible()

不是所有的ItemDataRoles将会有一个QHeaderView的效果。如果您需要绘制其他角色,你可以继承QHeaderView和重新实现paintEvent()。 QHeaderView尊重以下项目数据的作用:TextAlignmentRoleDisplayRoleFontRoleDecorationRoleForegroundRoleBackgroundRole

Note:每头呈现每个部分本身的数据,并且不依赖于委讬。其结果是,调用一个头的setItemDelegate( )函数就没有任何效果。


Type Documentation

  1. QHeaderView.ResizeMode

调整大小模式指定的标头部分的行为。它可以对整个头视图或在个别路段使用设置setResizeMode( ) 。

Constant Value Description
QHeaderView.Interactive 0 用户可以调整该区段。的部分也可以通过使用编程的调整大小resizeSection( ) 。本节大小默认为defaultSectionSize。 (另请参见cascadingSectionResizes。 )
QHeaderView.Fixed 2 用户不能调整的部分。节只能使用编程方式调整resizeSection( ) 。本节大小默认为defaultSectionSize
QHeaderView.Stretch 1 QHeaderView会自动调整节的大小,以填满可用空间。大小不能由用户或编程来改变。
QHeaderView.ResizeToContents 3 QHeaderView将自动调整大小的部分到其基于整个行或列的内容,最佳大小。大小不能由用户或编程来改变。 (该值是在4.2中引入)

下面的值已过时:

Constant Value Description
QHeaderView.Custom Fixed 使用固定代替。

See also setResizeMode( )stretchLastSectionminimumSectionSize


Method Documentation

  1. QHeaderView.__init__ (self, Qt.Orientation orientation, QWidget parent = None)

parent的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。

创建一个新的通用头与给定orientationparent

  1. bool QHeaderView.cascadingSectionResizes (self)
  1. int QHeaderView.count (self)

返回部分的标头中的数量。

See also sectionCountChanged()和length( ) 。

  1. QHeaderView.currentChanged (self, QModelIndex current, QModelIndex old)

从重新实现QAbstractItemView.currentChanged( ) 。

  1. QHeaderView.dataChanged (self, QModelIndex topLeft, QModelIndex bottomRight)
  1. Qt.Alignment QHeaderView.defaultAlignment (self)

[

  1. int QHeaderView.defaultSectionSize (self)
  1. bool QHeaderView.event (self, QEvent e)

]($docs-index.htm)

从重新实现QObject.event( ) 。

  1. QHeaderView.headerDataChanged (self, Qt.Orientation orientation, int logicalFirst, int logicalLast)

这种方法也是一个Qt槽与C + +的签名void headerDataChanged(Qt::Orientation,int,int)

更新改变的报头部分与给定orientation,从logicalFirstlogicalLast包容性。

  1. int QHeaderView.hiddenSectionCount (self)

返回部分中已隐藏的报头的数量。

这个函数是Qt 4.1中引入。

See also setSectionHidden()和isSectionHidden( ) 。

  1. QHeaderView.hideSection (self, int alogicalIndex)

隐藏由指定的段logicalIndex

See also showSection( )isSectionHidden( )hiddenSectionCount()和setSectionHidden( ) 。

  1. bool QHeaderView.highlightSections (self)
  1. int QHeaderView.horizontalOffset (self)

从重新实现QAbstractItemView.horizontalOffset( ) 。

返回水平标头的偏移量。这是0垂直头。

See also offset( ) 。

  1. QModelIndex QHeaderView.indexAt (self, QPoint p)

[

  1. QHeaderView.initialize (self)
  1. QHeaderView.initializeSections (self)
  1. QHeaderView.initializeSections (self, int start, int end)
  1. QHeaderView.initStyleOption (self, QStyleOptionHeader option)

]($docs-qmodelindex.html)

初始化option与其它的值QHeaderView。当他们需要一个这种方法是有用的子类QStyleOptionHeader,但不希望在所有的信息填写自己。

See also QStyleOption.initFrom( ) 。

  1. bool QHeaderView.isClickable (self)

返回True如果标题是可点击的,否则返回False 。一个可点击的标题可以被设置为允许用户更改数据在相关的头视图中的代表性。

See also setClickable( ) 。

  1. bool QHeaderView.isIndexHidden (self, QModelIndex index)
  1. bool QHeaderView.isMovable (self)

返回True如果头可以被用户移动,否则返回False 。

See also setMovable( ) 。

  1. bool QHeaderView.isSectionHidden (self, int logicalIndex)

返回True如果指定的节logicalIndex从用户明确地隐藏,否则返回False 。

See also hideSection( )showSection( )setSectionHidden()和hiddenSectionCount( ) 。

  1. bool QHeaderView.isSortIndicatorShown (self)
  1. int QHeaderView.length (self)

返回沿头的方向的长度。

See also sizeHint( )setResizeMode()和offset( ) 。

  1. int QHeaderView.logicalIndex (self, int visualIndex)

返回logicalIndex的部分在给定的visualIndex位置,或-1,如果visualIndex \u003c 0或visualIndex \u003e =QHeaderView.count( ) 。

注意, visualIndex不受隐藏部分。

See also visualIndex()和sectionPosition( ) 。

  1. int QHeaderView.logicalIndexAt (self, int position)

返回复盖给定的节position在视口中。

See also visualIndexAt()和isSectionHidden( ) 。

  1. int QHeaderView.logicalIndexAt (self, int ax, int ay)

返回部分的逻辑索引在给定的坐标。如果标题是水平x将被使用,否则y将被用来寻找逻辑索引。

  1. int QHeaderView.logicalIndexAt (self, QPoint apos)

返回部分的逻辑索引在给定的位置pos。如果标题是水平的x坐标将被使用,否则y坐标将被用来寻找逻辑索引。

See also sectionPosition( ) 。

  1. int QHeaderView.minimumSectionSize (self)
  1. QHeaderView.mouseDoubleClickEvent (self, QMouseEvent e)

从重新实现QWidget.mouseDoubleClickEvent( ) 。

  1. QHeaderView.mouseMoveEvent (self, QMouseEvent e)

从重新实现QWidget.mouseMoveEvent( ) 。

  1. QHeaderView.mousePressEvent (self, QMouseEvent e)

从重新实现QWidget.mousePressEvent( ) 。

  1. QHeaderView.mouseReleaseEvent (self, QMouseEvent e)

从重新实现QWidget.mouseReleaseEvent( ) 。

  1. QModelIndex QHeaderView.moveCursor (self, QAbstractItemView.CursorAction, Qt.KeyboardModifiers)

[

  1. QHeaderView.moveSection (self, int from, int to)

移动部分在视觉索引from佔据视觉指数to

]($docs-qmodelindex.html)

See also sectionsMoved( ) 。

  1. int QHeaderView.offset (self)

返回头的偏移量:这是标题的最左边(或最顶层垂直头)可见像素。

See also setOffset( ) 。

  1. Qt.Orientation QHeaderView.orientation (self)

[

返回头的方位。

]($docs-qt.html#Orientation-enum)

See also Qt.Orientation

  1. QHeaderView.paintEvent (self, QPaintEvent e)

从重新实现QWidget.paintEvent( ) 。

  1. QHeaderView.paintSection (self, QPainter painter, QRect rect, int logicalIndex)

绘制由给定指定的节logicalIndex,使用给定的painterrect

通常情况下,你不必调用这个函数。

  1. QHeaderView.reset (self)

从重新实现QAbstractItemView.reset( ) 。

  1. ResizeMode QHeaderView.resizeMode (self, int logicalIndex)

[

返回适用于部分由给定指定的尺寸模式logicalIndex

]($docs-qheaderview.html#ResizeMode-enum)

See also setResizeMode( ) 。

  1. QHeaderView.resizeSection (self, int logicalIndex, int size)

重新调整所指定的部分logicalIndexsize以像素为单位。

See also sectionResized( )resizeMode()和sectionSize( ) 。

  1. QHeaderView.resizeSections (self)

这种方法也是一个Qt槽与C + +的签名void resizeSections()

根据给定的大小调整部分mode忽略当前调整模式。

See also resizeMode()和sectionResized( ) 。

  1. QHeaderView.resizeSections (self, ResizeMode mode)

根据他们的大小提示重新调整的部分。通常情况下,你不必调用这个函数。

  1. bool QHeaderView.restoreState (self, QByteArray state)

恢复state这头视图。这个函数返回true如果状态得到恢复,否则返回False 。

此功能被引入Qt的4.3 。

See also saveState( ) 。

  1. QHeaderView.rowsInserted (self, QModelIndex parent, int start, int end)
  1. QByteArray QHeaderView.saveState (self)

[

保存这个头视图的当前状态。

]($docs-qbytearray.html)

要恢复保存的状态,返回值传递给restoreState( ) 。

此功能被引入Qt的4.3 。

See also restoreState( ) 。

  1. QHeaderView.scrollContentsBy (self, int dx, int dy)
  1. QHeaderView.scrollTo (self, QModelIndex index, QAbstractItemView.ScrollHint hint)
  1. int QHeaderView.sectionPosition (self, int logicalIndex)

返回给定的区间位置logicalIndex,或-1,如果部分被隐藏。位置是衡量像素从第一个可见项的左上角,以该项目的左上角与logicalIndex。测量是沿x轴为水平的标头,并沿y轴为垂直的标头。

See also sectionViewportPosition( ) 。

  1. QHeaderView.sectionsAboutToBeRemoved (self, QModelIndex parent, int logicalFirst, int logicalLast)

这种方法也是一个Qt槽与C + +的签名void sectionsAboutToBeRemoved(const QModelIndex&,int,int)

当部分被从删除该槽被调用parentlogicalFirstlogicalLast表示除去路段。

如果只有一个部分被去除,logicalFirstlogicalLast将是相同的。

  1. bool QHeaderView.sectionsHidden (self)

返回True如果在头段已被隐藏,否则返回False ;

这个函数是Qt 4.1中引入。

See also setSectionHidden( ) 。

  1. QHeaderView.sectionsInserted (self, QModelIndex parent, int logicalFirst, int logicalLast)

这种方法也是一个Qt槽与C + +的签名void sectionsInserted(const QModelIndex&,int,int)

当部分被插入到该插槽被称为parentlogicalFirstlogicalLast指数表示插入新的路段。

如果只插入一个部分,logicalFirstlogicalLast将是相同的。

  1. int QHeaderView.sectionSize (self, int logicalIndex)

返回给定的宽度(或高度垂直头)logicalIndex

See also length( )setResizeMode()和defaultSectionSize( ) 。

  1. QSize QHeaderView.sectionSizeFromContents (self, int logicalIndex)

[

返回的部分的内容由给定的指定尺寸logicalIndex

]($docs-qsize.html)

See also defaultSectionSize( ) 。

  1. int QHeaderView.sectionSizeHint (self, int logicalIndex)

返回一个合适大小的提示由指定的节logicalIndex

See also sizeHint( )defaultSectionSize( )minimumSectionSize()和Qt.SizeHintRole

  1. bool QHeaderView.sectionsMoved (self)

返回True如果在头段已被移动,否则返回False ;

See also moveSection( ) 。

  1. int QHeaderView.sectionViewportPosition (self, int logicalIndex)

返回给定的部分视口位置logicalIndex

如果部分被隐藏,返回值是不确定的。

See also sectionPosition()和isSectionHidden( ) 。

  1. QHeaderView.setCascadingSectionResizes (self, bool enable)
  1. QHeaderView.setClickable (self, bool clickable)

If clickable是真的,头将响应单一的点击。

See also isClickable( )sectionClicked( )sectionPressed()和setSortIndicatorShown( ) 。

  1. QHeaderView.setDefaultAlignment (self, Qt.Alignment alignment)
  1. QHeaderView.setDefaultSectionSize (self, int size)
  1. QHeaderView.setHighlightSections (self, bool highlight)
  1. QHeaderView.setMinimumSectionSize (self, int size)
  1. QHeaderView.setModel (self, QAbstractItemModel model)

从重新实现QAbstractItemView.setModel( ) 。

  1. QHeaderView.setMovable (self, bool movable)

If movable为真,则报头可以被用户移动,否则它被固定在适当位置。

See also isMovable()和sectionMoved( ) 。

  1. QHeaderView.setOffset (self, int offset)

这种方法也是一个Qt槽与C + +的签名void setOffset(int)

套头的偏移量offset

See also offset()和length( ) 。

  1. QHeaderView.setOffsetToLastSection (self)

这种方法也是一个Qt槽与C + +的签名void setOffsetToLastSection()

设置偏移,使上节可见。

这个函数中引入了Qt 4.2中。

See also setOffset( )sectionPosition()和setOffsetToSectionPosition( ) 。

  1. QHeaderView.setOffsetToSectionPosition (self, int visualIndex)

这种方法也是一个Qt槽与C + +的签名void setOffsetToSectionPosition(int)

集在给定的偏移量的部分的开始visualIndex

这个函数中引入了Qt 4.2中。

See also setOffset()和sectionPosition( ) 。

  1. QHeaderView.setResizeMode (self, ResizeMode mode)

设置如何头可以调整到那些由给定描述的约束mode

See also resizeMode( )length( )sectionResized()和sectionAutoResize( ) 。

  1. QHeaderView.setResizeMode (self, int logicalIndex, ResizeMode mode)

这是一个重载函数。

设置约束的部分由指定如何logicalIndex在头可以调整到那些由给定的描述mode。逻辑索引应该存在在这个函数被调用的时间。

Note:此设置将被忽略的最后一节,如果stretchLastSection属性设置为True。这是默认提供的水平标题QTreeView

See also setStretchLastSection( ) 。

  1. QHeaderView.setSectionHidden (self, int logicalIndex, bool hide)

If hide是真正的由指定的段logicalIndex是隐藏的,否则该部分被示出。

See also isSectionHidden()和hiddenSectionCount( ) 。

  1. QHeaderView.setSelection (self, QRect, QItemSelectionModel.SelectionFlags)

从重新实现QAbstractItemView.setSelection( ) 。

选择在给定的项目rect根据指定的flags

基类的实现不执行任何操作。

  1. QHeaderView.setSortIndicator (self, int logicalIndex, Qt.SortOrder order)

设置排序指标由给定指定的节logicalIndex在所指定的方向order,并删除从已显示它的任何其他部分的排序指标。

logicalIndex可能是-1 ,在这种情况下,不排序指示器将显示与该模型将回到它的自然,未排序的顺序。请注意,并非所有型号都支持这一点,甚至可能会崩溃在这种情况下。

See also sortIndicatorSection()和sortIndicatorOrder( ) 。

  1. QHeaderView.setSortIndicatorShown (self, bool show)
  1. QHeaderView.setStretchLastSection (self, bool stretch)
  1. QHeaderView.showSection (self, int alogicalIndex)

显示由指定的节logicalIndex

See also hideSection( )isSectionHidden( )hiddenSectionCount()和setSectionHidden( ) 。

  1. QSize QHeaderView.sizeHint (self)

从重新实现QWidget.sizeHint( ) 。

返回一个合适的尺寸暗示这个头。

See also sectionSizeHint( ) 。

  1. Qt.SortOrder QHeaderView.sortIndicatorOrder (self)

[

返回排序指标的顺序。如果没有部分有一个排序指示器这个函数的返回值是不确定的。

]($docs-qt.html#SortOrder-enum)

See also setSortIndicator()和sortIndicatorSection( ) 。

  1. int QHeaderView.sortIndicatorSection (self)

返回具有某种指示器部分的逻辑索引。默认情况下,这是一节0 。

See also setSortIndicator( )sortIndicatorOrder()和setSortIndicatorShown( ) 。

  1. bool QHeaderView.stretchLastSection (self)
  1. int QHeaderView.stretchSectionCount (self)

返回设置为调整模式舒展的节数。在视图中,这可以用来查看是否headerview需要调整的部分,当视图的几何变化。

这个函数是Qt 4.1中引入。

See also stretchLastSectionresizeMode( ) 。

  1. QHeaderView.swapSections (self, int first, int second)

掉期的部分在视觉索引first与部分在视觉索引second

这个函数中引入了Qt 4.2中。

See also moveSection( ) 。

  1. QHeaderView.updateGeometries (self)
  1. QHeaderView.updateSection (self, int logicalIndex)

这种方法也是一个Qt槽与C + +的签名void updateSection(int)

  1. int QHeaderView.verticalOffset (self)

从重新实现QAbstractItemView.verticalOffset( ) 。

返回垂直头的偏移量。这是0水平的标头。

See also offset( ) 。

  1. bool QHeaderView.viewportEvent (self, QEvent e)

从重新实现QAbstractScrollArea.viewportEvent( ) 。

  1. int QHeaderView.visualIndex (self, int logicalIndex)

返回段由给定指定的可视索引位置logicalIndex,否则返回-1 。

隐藏部分仍然具有有效的可视化索引。

See also logicalIndex( ) 。

  1. int QHeaderView.visualIndexAt (self, int position)

返回复盖给定部分的视觉索引position在视口中。

See also logicalIndexAt( ) 。

  1. QRect QHeaderView.visualRect (self, QModelIndex index)

  1. QRegion QHeaderView.visualRegionForSelection (self, QItemSelection selection)

[

  1. QHeaderView.__len__ (self)

Qt Signal Documentation

  1. void geometriesChanged ()

这是该信号的默认超载。

当标头的几何形状发生了变化,这个信号被发射。

这个函数中引入了Qt 4.2中。

  1. void sectionAutoResize (int,QHeaderView::ResizeMode)

这是该信号的默认超载。

这个信号被发射时,部分会自动调整大小。该部分的逻辑索引是通过指定logicalIndex,并调整大小模式mode

]($docs-qregion.html)

See also setResizeMode()和stretchLastSection( ) 。

  1. void sectionClicked (int)

这是该信号的默认超载。

一个部分被点击时,这个信号被发射。该部分的逻辑索引是通过指定logicalIndex

注意, sectionPressed信号也将被发射。

See also setClickable()和sectionPressed( ) 。

  1. void sectionCountChanged (int,int)

这是该信号的默认超载。

这个信号被发射时,部分的数目发生变化,即,当部分被添加或删除。原始计数被指定oldCount,并且由新的计newCount

See also count( )length()和headerDataChanged( ) 。

  1. void sectionDoubleClicked (int)

这是该信号的默认超载。

当一个段被双击这个信号被发射。该部分的逻辑索引是通过指定logicalIndex

See also setClickable( ) 。

  1. void sectionEntered (int)

这是该信号的默认超载。

当光标移过的部分和鼠标左键被按下这个信号被发射。该部分的逻辑索引是通过指定logicalIndex

此功能被引入Qt的4.3 。

See also setClickable()和sectionPressed( ) 。

  1. void sectionHandleDoubleClicked (int)

这是该信号的默认超载。

当一个段被双击这个信号被发射。该部分的逻辑索引是通过指定logicalIndex

See also setClickable( ) 。

  1. void sectionMoved (int,int,int)

这是该信号的默认超载。

当一个区段被移动这个信号被发射。该部分的逻辑索引是通过指定logicalIndex,老指数由oldVisualIndex,并且由新的索引位置newVisualIndex

See also moveSection( ) 。

  1. void sectionPressed (int)

这是该信号的默认超载。

当一个区段被按下这个信号被发射。该部分的逻辑索引是通过指定logicalIndex

See also setClickable( ) 。

  1. void sectionResized (int,int,int)

这是该信号的默认超载。

当一个部分被调整大小,这个信号被发射。该部分的逻辑数由指定logicalIndex,旧的大小由oldSize,并以新的大小newSize

See also resizeSection( ) 。

  1. void sortIndicatorChanged (int,Qt::SortOrder)

这是该信号的默认超载。

当改变包含排序指示器或指示的顺序的部分,这个信号被发射。该部分的逻辑索引是通过指定logicalIndex并通过指定的排序顺序order

此功能被引入Qt的4.3 。

See also setSortIndicator( ) 。