<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # QHeaderView Class Reference ## [[QtGui](index.htm) module] 該QHeaderView類提供了一個標題行或項目的意見標題列。[More...](#details) 繼承[QAbstractItemView](qabstractitemview.html)。 ### 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顯示在項目的意見,如使用的頭[QTableView](qtableview.html)和[QTreeView](qtreeview.html)類。它需要Qt3的的地點`QHeader`級以前用于同樣的目的,但使用Qt的模型/視圖架構與項目視圖類的一致性。 該QHeaderView類是一個[Model/View Classes](index.htm)并且是Qt的一部分[model/view framework](index.htm)。 從模型中使用的報頭獲取的每個部分中的數據的[QAbstractItemModel.headerData](qabstractitemmodel.html#headerData)()函數。您可以通過使用數據集[QAbstractItemModel.setHeaderData](qabstractitemmodel.html#setHeaderData)( ) 。 每個頭都有一個[orientation](qheaderview.html#orientation)()和若干節,由給定的[count](qheaderview.html#count)()函數。甲部分指的是報頭的一部分 - 要么一排或一列,取決于方位。 部分可以移動和調整大小使用[moveSection](qheaderview.html#moveSection)()和[resizeSection](qheaderview.html#resizeSection)() ,它們也可以被隱藏,以示[hideSection](qheaderview.html#hideSection)()和[showSection](qheaderview.html#showSection)( ) 。 報頭的每個部分是由一個段的ID ,則其部分(指定的)中描述,并且可以位于特定的[visualIndex](qheaderview.html#visualIndex)()的報頭。 A節可以有一個排序的指標設置[setSortIndicator](qheaderview.html#setSortIndicator)();這表明無論是在相關的項目視圖中的項目將在由部分給定的順序進行排序。 對于一個水平標頭中的部分等效于在模型中的一列,并為一個垂直頭中的部分等效于一個行中的模型。 ### Moving Header Sections 一個頭可以固定在適當位置,或做成可移動的帶[setMovable](qheaderview.html#setMovable)( ) 。它可以制成可點擊與[setClickable](qheaderview.html#setClickable)() ,并調整大小按照行為[setResizeMode](qheaderview.html#setResizeMode)( ) 。 **Note:**上一個頭要調整部分雙擊僅適用于可見行。 一個頭會發出[sectionMoved](qheaderview.html#sectionMoved)()如果用戶移動部分,[sectionResized](qheaderview.html#sectionResized)()如果用戶調整一個部分,[sectionClicked](qheaderview.html#sectionClicked)()以及[sectionHandleDoubleClicked](qheaderview.html#sectionHandleDoubleClicked)( )響應鼠標點擊。一個頭也會放出[sectionCountChanged](qheaderview.html#sectionCountChanged)()和[sectionAutoResize](qheaderview.html#sectionAutoResize)( ) 。 您可以使用識別部分[logicalIndex](qheaderview.html#logicalIndex)()和[logicalIndexAt](qheaderview.html#logicalIndexAt)( )函數,或者通過其索引位置,使用[visualIndex](qheaderview.html#visualIndex)()和[visualIndexAt](qheaderview.html#visualIndexAt)()函數。視覺索引會改變,如果一個部分被移動,但邏輯索引不會改變。 ### Appearance [QTableWidget](qtablewidget.html)和[QTableView](qtableview.html)創建默認標題。如果你想標題是可見的,你可以使用[setVisible()](qwidget.html#visible-prop)。 不是所有的[ItemDataRole](qt.html#ItemDataRole-enum)s將會有一個QHeaderView的效果。如果您需要繪制其他角色,你可以繼承QHeaderView和重新實現[paintEvent()](qheaderview.html#paintEvent)。 QHeaderView尊重以下項目數據的作用:[TextAlignmentRole](qt.html#ItemDataRole-enum),[DisplayRole](qt.html#ItemDataRole-enum),[FontRole](qt.html#ItemDataRole-enum),[DecorationRole](qt.html#ItemDataRole-enum),[ForegroundRole](qt.html#ItemDataRole-enum)和[BackgroundRole](qt.html#ItemDataRole-enum)。 **Note:**每頭呈現每個部分本身的數據,并且不依賴于委讬。其結果是,調用一個頭的[setItemDelegate](qabstractitemview.html#setItemDelegate)( )函數就沒有任何效果。 * * * ## Type Documentation ``` QHeaderView.ResizeMode ``` 調整大小模式指定的標頭部分的行為。它可以對整個頭視圖或在個別路段使用設置[setResizeMode](qheaderview.html#setResizeMode)( ) 。 | Constant | Value | Description | | --- | --- | --- | | `QHeaderView.Interactive` | `0` | 用戶可以調整該區段。的部分也可以通過使用編程的調整大小[resizeSection](qheaderview.html#resizeSection)( ) 。本節大小默認為[defaultSectionSize](qheaderview.html#defaultSectionSize-prop)。 (另請參見[cascadingSectionResizes](qheaderview.html#cascadingSectionResizes-prop)。 ) | | `QHeaderView.Fixed` | `2` | 用戶不能調整的部分。節只能使用編程方式調整[resizeSection](qheaderview.html#resizeSection)( ) 。本節大小默認為[defaultSectionSize](qheaderview.html#defaultSectionSize-prop)。 | | `QHeaderView.Stretch` | `1` | [QHeaderView](qheaderview.html)會自動調整節的大小,以填滿可用空間。大小不能由用戶或編程來改變。 | | `QHeaderView.ResizeToContents` | `3` | [QHeaderView](qheaderview.html)將自動調整大小的部分到其基于整個行或列的內容,最佳大小。大小不能由用戶或編程來改變。 (該值是在4.2中引入) | 下面的值已過時: | Constant | Value | Description | | --- | --- | --- | | `QHeaderView.Custom` | `Fixed` | 使用固定代替。 | **See also** [setResizeMode](qheaderview.html#setResizeMode)( )[stretchLastSection](qheaderview.html#stretchLastSection-prop)和[minimumSectionSize](qheaderview.html#minimumSectionSize-prop)。 * * * ## Method Documentation ``` QHeaderView.__init__ (self, Qt.Orientation?orientation, QWidget?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 創建一個新的通用頭與給定_orientation_和_parent_。 ``` bool QHeaderView.cascadingSectionResizes (self) ``` ``` int QHeaderView.count (self) ``` 返回部分的標頭中的數量。 **See also** [sectionCountChanged](qheaderview.html#sectionCountChanged)()和[length](qheaderview.html#length)( ) 。 ``` QHeaderView.currentChanged (self, QModelIndex?current, QModelIndex?old) ``` 從重新實現[QAbstractItemView.currentChanged](qabstractitemview.html#currentChanged)( ) 。 ``` QHeaderView.dataChanged (self, QModelIndex?topLeft, QModelIndex?bottomRight) ``` ``` Qt.Alignment QHeaderView.defaultAlignment (self) ``` [ ``` int QHeaderView.defaultSectionSize (self) ``` ``` bool QHeaderView.event (self, QEvent?e) ``` ](index.htm) [從重新實現](index.htm)[QObject.event](qobject.html#event)( ) 。 ``` QHeaderView.headerDataChanged (self, Qt.Orientation?orientation, int?logicalFirst, int?logicalLast) ``` 這種方法也是一個Qt槽與C + +的簽名`void headerDataChanged(Qt::Orientation,int,int)`。 更新改變的報頭部分與給定_orientation_,從_logicalFirst_至_logicalLast_包容性。 ``` int QHeaderView.hiddenSectionCount (self) ``` 返回部分中已隱藏的報頭的數量。 這個函數是Qt 4.1中引入。 **See also** [setSectionHidden](qheaderview.html#setSectionHidden)()和[isSectionHidden](qheaderview.html#isSectionHidden)( ) 。 ``` QHeaderView.hideSection (self, int?alogicalIndex) ``` 隱藏由指定的段_logicalIndex_。 **See also** [showSection](qheaderview.html#showSection)( )[isSectionHidden](qheaderview.html#isSectionHidden)( )[hiddenSectionCount](qheaderview.html#hiddenSectionCount)()和[setSectionHidden](qheaderview.html#setSectionHidden)( ) 。 ``` bool QHeaderView.highlightSections (self) ``` ``` int QHeaderView.horizontalOffset (self) ``` 從重新實現[QAbstractItemView.horizontalOffset](qabstractitemview.html#horizontalOffset)( ) 。 返回水平標頭的偏移量。這是0垂直頭。 **See also** [offset](qheaderview.html#offset)( ) 。 ``` QModelIndex QHeaderView.indexAt (self, QPoint?p) ``` [ ``` QHeaderView.initialize (self) ``` ``` QHeaderView.initializeSections (self) ``` ``` QHeaderView.initializeSections (self, int?start, int?end) ``` ``` QHeaderView.initStyleOption (self, QStyleOptionHeader?option) ``` ](qmodelindex.html) [初始化_option_與其它的值](qmodelindex.html)[QHeaderView](qheaderview.html)。當他們需要一個這種方法是有用的子類[QStyleOptionHeader](qstyleoptionheader.html),但不希望在所有的信息填寫自己。 **See also** [QStyleOption.initFrom](qstyleoption.html#initFrom)( ) 。 ``` bool QHeaderView.isClickable (self) ``` 返回True如果標題是可點擊的,否則返回False 。一個可點擊的標題可以被設置為允許用戶更改數據在相關的頭視圖中的代表性。 **See also** [setClickable](qheaderview.html#setClickable)( ) 。 ``` bool QHeaderView.isIndexHidden (self, QModelIndex?index) ``` ``` bool QHeaderView.isMovable (self) ``` 返回True如果頭可以被用戶移動,否則返回False 。 **See also** [setMovable](qheaderview.html#setMovable)( ) 。 ``` bool QHeaderView.isSectionHidden (self, int?logicalIndex) ``` 返回True如果指定的節_logicalIndex_從用戶明確地隱藏,否則返回False 。 **See also** [hideSection](qheaderview.html#hideSection)( )[showSection](qheaderview.html#showSection)( )[setSectionHidden](qheaderview.html#setSectionHidden)()和[hiddenSectionCount](qheaderview.html#hiddenSectionCount)( ) 。 ``` bool QHeaderView.isSortIndicatorShown (self) ``` ``` int QHeaderView.length (self) ``` 返回沿頭的方向的長度。 **See also** [sizeHint](qheaderview.html#sizeHint)( )[setResizeMode](qheaderview.html#setResizeMode)()和[offset](qheaderview.html#offset)( ) 。 ``` int QHeaderView.logicalIndex (self, int?visualIndex) ``` 返回logicalIndex的部分在給定的_visualIndex_位置,或-1,如果visualIndex \u003c 0或visualIndex \u003e =[QHeaderView.count](qheaderview.html#count)( ) 。 注意, visualIndex不受隱藏部分。 **See also** [visualIndex](qheaderview.html#visualIndex)()和[sectionPosition](qheaderview.html#sectionPosition)( ) 。 ``` int QHeaderView.logicalIndexAt (self, int?position) ``` 返回復蓋給定的節_position_在視口中。 **See also** [visualIndexAt](qheaderview.html#visualIndexAt)()和[isSectionHidden](qheaderview.html#isSectionHidden)( ) 。 ``` int QHeaderView.logicalIndexAt (self, int?ax, int?ay) ``` 返回部分的邏輯索引在給定的坐標。如果標題是水平_x_將被使用,否則_y_將被用來尋找邏輯索引。 ``` int QHeaderView.logicalIndexAt (self, QPoint?apos) ``` 返回部分的邏輯索引在給定的位置_pos_。如果標題是水平的x坐標將被使用,否則y坐標將被用來尋找邏輯索引。 **See also** [sectionPosition](qheaderview.html#sectionPosition)( ) 。 ``` int QHeaderView.minimumSectionSize (self) ``` ``` QHeaderView.mouseDoubleClickEvent (self, QMouseEvent?e) ``` 從重新實現[QWidget.mouseDoubleClickEvent](qwidget.html#mouseDoubleClickEvent)( ) 。 ``` QHeaderView.mouseMoveEvent (self, QMouseEvent?e) ``` 從重新實現[QWidget.mouseMoveEvent](qwidget.html#mouseMoveEvent)( ) 。 ``` QHeaderView.mousePressEvent (self, QMouseEvent?e) ``` 從重新實現[QWidget.mousePressEvent](qwidget.html#mousePressEvent)( ) 。 ``` QHeaderView.mouseReleaseEvent (self, QMouseEvent?e) ``` 從重新實現[QWidget.mouseReleaseEvent](qwidget.html#mouseReleaseEvent)( ) 。 ``` QModelIndex QHeaderView.moveCursor (self, QAbstractItemView.CursorAction, Qt.KeyboardModifiers) ``` [ ``` QHeaderView.moveSection (self, int?from, int?to) ``` 移動部分在視覺索引_from_佔據視覺指數_to_。 ](qmodelindex.html) [**See also**](qmodelindex.html) [sectionsMoved](qheaderview.html#sectionsMoved)( ) 。 ``` int QHeaderView.offset (self) ``` 返回頭的偏移量:這是標題的最左邊(或最頂層垂直頭)可見像素。 **See also** [setOffset](qheaderview.html#setOffset)( ) 。 ``` Qt.Orientation QHeaderView.orientation (self) ``` [ 返回頭的方位。 ](qt.html#Orientation-enum) [**See also**](qt.html#Orientation-enum) [Qt.Orientation](qt.html#Orientation-enum)。 ``` QHeaderView.paintEvent (self, QPaintEvent?e) ``` 從重新實現[QWidget.paintEvent](qwidget.html#paintEvent)( ) 。 ``` QHeaderView.paintSection (self, QPainter?painter, QRect?rect, int?logicalIndex) ``` 繪制由給定指定的節_logicalIndex_,使用給定的_painter_和_rect_。 通常情況下,你不必調用這個函數。 ``` QHeaderView.reset (self) ``` 從重新實現[QAbstractItemView.reset](qabstractitemview.html#reset)( ) 。 ``` ResizeMode QHeaderView.resizeMode (self, int?logicalIndex) ``` [ 返回適用于部分由給定指定的尺寸模式_logicalIndex_。 ](qheaderview.html#ResizeMode-enum) [**See also**](qheaderview.html#ResizeMode-enum) [setResizeMode](qheaderview.html#setResizeMode)( ) 。 ``` QHeaderView.resizeSection (self, int?logicalIndex, int?size) ``` 重新調整所指定的部分_logicalIndex_至_size_以像素為單位。 **See also** [sectionResized](qheaderview.html#sectionResized)( )[resizeMode](qheaderview.html#resizeMode)()和[sectionSize](qheaderview.html#sectionSize)( ) 。 ``` QHeaderView.resizeSections (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void resizeSections()`。 根據給定的大小調整部分_mode_忽略當前調整模式。 **See also** [resizeMode](qheaderview.html#resizeMode)()和[sectionResized](qheaderview.html#sectionResized)( ) 。 ``` QHeaderView.resizeSections (self, ResizeMode?mode) ``` 根據他們的大小提示重新調整的部分。通常情況下,你不必調用這個函數。 ``` bool QHeaderView.restoreState (self, QByteArray?state) ``` 恢復_state_這頭視圖。這個函數返回`true`如果狀態得到恢復,否則返回False 。 此功能被引入Qt的4.3 。 **See also** [saveState](qheaderview.html#saveState)( ) 。 ``` QHeaderView.rowsInserted (self, QModelIndex?parent, int?start, int?end) ``` ``` QByteArray QHeaderView.saveState (self) ``` [ 保存這個頭視圖的當前狀態。 ](qbytearray.html) [要恢復保存的狀態,返回值傳遞給](qbytearray.html)[restoreState](qheaderview.html#restoreState)( ) 。 此功能被引入Qt的4.3 。 **See also** [restoreState](qheaderview.html#restoreState)( ) 。 ``` QHeaderView.scrollContentsBy (self, int?dx, int?dy) ``` ``` QHeaderView.scrollTo (self, QModelIndex?index, QAbstractItemView.ScrollHint?hint) ``` ``` int QHeaderView.sectionPosition (self, int?logicalIndex) ``` 返回給定的區間位置_logicalIndex_,或-1,如果部分被隱藏。位置是衡量像素從第一個可見項的左上角,以該項目的左上角與_logicalIndex_。測量是沿x軸為水平的標頭,并沿y軸為垂直的標頭。 **See also** [sectionViewportPosition](qheaderview.html#sectionViewportPosition)( ) 。 ``` QHeaderView.sectionsAboutToBeRemoved (self, QModelIndex?parent, int?logicalFirst, int?logicalLast) ``` 這種方法也是一個Qt槽與C + +的簽名`void sectionsAboutToBeRemoved(const QModelIndex&,int,int)`。 當部分被從刪除該槽被調用_parent_。_logicalFirst_和_logicalLast_表示除去路段。 如果只有一個部分被去除,_logicalFirst_和_logicalLast_將是相同的。 ``` bool QHeaderView.sectionsHidden (self) ``` 返回True如果在頭段已被隱藏,否則返回False ; 這個函數是Qt 4.1中引入。 **See also** [setSectionHidden](qheaderview.html#setSectionHidden)( ) 。 ``` QHeaderView.sectionsInserted (self, QModelIndex?parent, int?logicalFirst, int?logicalLast) ``` 這種方法也是一個Qt槽與C + +的簽名`void sectionsInserted(const QModelIndex&,int,int)`。 當部分被插入到該插槽被稱為_parent_。_logicalFirst_和_logicalLast_指數表示插入新的路段。 如果只插入一個部分,_logicalFirst_和_logicalLast_將是相同的。 ``` int QHeaderView.sectionSize (self, int?logicalIndex) ``` 返回給定的寬度(或高度垂直頭)_logicalIndex_。 **See also** [length](qheaderview.html#length)( )[setResizeMode](qheaderview.html#setResizeMode)()和[defaultSectionSize](qheaderview.html#defaultSectionSize-prop)( ) 。 ``` QSize QHeaderView.sectionSizeFromContents (self, int?logicalIndex) ``` [ 返回的部分的內容由給定的指定尺寸_logicalIndex_。 ](qsize.html) [**See also**](qsize.html) [defaultSectionSize](qheaderview.html#defaultSectionSize-prop)( ) 。 ``` int QHeaderView.sectionSizeHint (self, int?logicalIndex) ``` 返回一個合適大小的提示由指定的節_logicalIndex_。 **See also** [sizeHint](qheaderview.html#sizeHint)( )[defaultSectionSize](qheaderview.html#defaultSectionSize-prop)( )[minimumSectionSize](qheaderview.html#minimumSectionSize-prop)()和[Qt.SizeHintRole](qt.html#ItemDataRole-enum)。 ``` bool QHeaderView.sectionsMoved (self) ``` 返回True如果在頭段已被移動,否則返回False ; **See also** [moveSection](qheaderview.html#moveSection)( ) 。 ``` int QHeaderView.sectionViewportPosition (self, int?logicalIndex) ``` 返回給定的部分視口位置_logicalIndex_。 如果部分被隱藏,返回值是不確定的。 **See also** [sectionPosition](qheaderview.html#sectionPosition)()和[isSectionHidden](qheaderview.html#isSectionHidden)( ) 。 ``` QHeaderView.setCascadingSectionResizes (self, bool?enable) ``` ``` QHeaderView.setClickable (self, bool?clickable) ``` If _clickable_是真的,頭將響應單一的點擊。 **See also** [isClickable](qheaderview.html#isClickable)( )[sectionClicked](qheaderview.html#sectionClicked)( )[sectionPressed](qheaderview.html#sectionPressed)()和[setSortIndicatorShown](qheaderview.html#showSortIndicator-prop)( ) 。 ``` QHeaderView.setDefaultAlignment (self, Qt.Alignment?alignment) ``` ``` QHeaderView.setDefaultSectionSize (self, int?size) ``` ``` QHeaderView.setHighlightSections (self, bool?highlight) ``` ``` QHeaderView.setMinimumSectionSize (self, int?size) ``` ``` QHeaderView.setModel (self, QAbstractItemModel?model) ``` 從重新實現[QAbstractItemView.setModel](qabstractitemview.html#setModel)( ) 。 ``` QHeaderView.setMovable (self, bool?movable) ``` If _movable_為真,則報頭可以被用戶移動,否則它被固定在適當位置。 **See also** [isMovable](qheaderview.html#isMovable)()和[sectionMoved](qheaderview.html#sectionMoved)( ) 。 ``` QHeaderView.setOffset (self, int?offset) ``` 這種方法也是一個Qt槽與C + +的簽名`void setOffset(int)`。 套頭的偏移量_offset_。 **See also** [offset](qheaderview.html#offset)()和[length](qheaderview.html#length)( ) 。 ``` QHeaderView.setOffsetToLastSection (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void setOffsetToLastSection()`。 設置偏移,使上節可見。 這個函數中引入了Qt 4.2中。 **See also** [setOffset](qheaderview.html#setOffset)( )[sectionPosition](qheaderview.html#sectionPosition)()和[setOffsetToSectionPosition](qheaderview.html#setOffsetToSectionPosition)( ) 。 ``` QHeaderView.setOffsetToSectionPosition (self, int?visualIndex) ``` 這種方法也是一個Qt槽與C + +的簽名`void setOffsetToSectionPosition(int)`。 集在給定的偏移量的部分的開始_visualIndex_。 這個函數中引入了Qt 4.2中。 **See also** [setOffset](qheaderview.html#setOffset)()和[sectionPosition](qheaderview.html#sectionPosition)( ) 。 ``` QHeaderView.setResizeMode (self, ResizeMode?mode) ``` 設置如何頭可以調整到那些由給定描述的約束_mode_。 **See also** [resizeMode](qheaderview.html#resizeMode)( )[length](qheaderview.html#length)( )[sectionResized](qheaderview.html#sectionResized)()和[sectionAutoResize](qheaderview.html#sectionAutoResize)( ) 。 ``` QHeaderView.setResizeMode (self, int?logicalIndex, ResizeMode?mode) ``` 這是一個重載函數。 設置約束的部分由指定如何_logicalIndex_在頭可以調整到那些由給定的描述_mode_。邏輯索引應該存在在這個函數被調用的時間。 **Note:**此設置將被忽略的最后一節,如果[stretchLastSection](qheaderview.html#stretchLastSection-prop)屬性設置為True。這是默認提供的水平標題[QTreeView](qtreeview.html)。 **See also** [setStretchLastSection](qheaderview.html#stretchLastSection-prop)( ) 。 ``` QHeaderView.setSectionHidden (self, int?logicalIndex, bool?hide) ``` If _hide_是真正的由指定的段_logicalIndex_是隱藏的,否則該部分被示出。 **See also** [isSectionHidden](qheaderview.html#isSectionHidden)()和[hiddenSectionCount](qheaderview.html#hiddenSectionCount)( ) 。 ``` QHeaderView.setSelection (self, QRect, QItemSelectionModel.SelectionFlags) ``` 從重新實現[QAbstractItemView.setSelection](qabstractitemview.html#setSelection)( ) 。 選擇在給定的項目_rect_根據指定的_flags_。 基類的實現不執行任何操作。 ``` QHeaderView.setSortIndicator (self, int?logicalIndex, Qt.SortOrder?order) ``` 設置排序指標由給定指定的節_logicalIndex_在所指定的方向_order_,并刪除從已顯示它的任何其他部分的排序指標。 _logicalIndex_可能是-1 ,在這種情況下,不排序指示器將顯示與該模型將回到它的自然,未排序的順序。請注意,并非所有型號都支持這一點,甚至可能會崩潰在這種情況下。 **See also** [sortIndicatorSection](qheaderview.html#sortIndicatorSection)()和[sortIndicatorOrder](qheaderview.html#sortIndicatorOrder)( ) 。 ``` QHeaderView.setSortIndicatorShown (self, bool?show) ``` ``` QHeaderView.setStretchLastSection (self, bool?stretch) ``` ``` QHeaderView.showSection (self, int?alogicalIndex) ``` 顯示由指定的節_logicalIndex_。 **See also** [hideSection](qheaderview.html#hideSection)( )[isSectionHidden](qheaderview.html#isSectionHidden)( )[hiddenSectionCount](qheaderview.html#hiddenSectionCount)()和[setSectionHidden](qheaderview.html#setSectionHidden)( ) 。 ``` QSize QHeaderView.sizeHint (self) ``` [](qsize.html) [從重新實現](qsize.html)[QWidget.sizeHint](qwidget.html#sizeHint-prop)( ) 。 返回一個合適的尺寸暗示這個頭。 **See also** [sectionSizeHint](qheaderview.html#sectionSizeHint)( ) 。 ``` Qt.SortOrder QHeaderView.sortIndicatorOrder (self) ``` [ 返回排序指標的順序。如果沒有部分有一個排序指示器這個函數的返回值是不確定的。 ](qt.html#SortOrder-enum) [**See also**](qt.html#SortOrder-enum) [setSortIndicator](qheaderview.html#setSortIndicator)()和[sortIndicatorSection](qheaderview.html#sortIndicatorSection)( ) 。 ``` int QHeaderView.sortIndicatorSection (self) ``` 返回具有某種指示器部分的邏輯索引。默認情況下,這是一節0 。 **See also** [setSortIndicator](qheaderview.html#setSortIndicator)( )[sortIndicatorOrder](qheaderview.html#sortIndicatorOrder)()和[setSortIndicatorShown](qheaderview.html#showSortIndicator-prop)( ) 。 ``` bool QHeaderView.stretchLastSection (self) ``` ``` int QHeaderView.stretchSectionCount (self) ``` 返回設置為調整模式舒展的節數。在視圖中,這可以用來查看是否headerview需要調整的部分,當視圖的幾何變化。 這個函數是Qt 4.1中引入。 **See also** [stretchLastSection](qheaderview.html#stretchLastSection-prop)和[resizeMode](qheaderview.html#resizeMode)( ) 。 ``` QHeaderView.swapSections (self, int?first, int?second) ``` 掉期的部分在視覺索引_first_與部分在視覺索引_second_。 這個函數中引入了Qt 4.2中。 **See also** [moveSection](qheaderview.html#moveSection)( ) 。 ``` QHeaderView.updateGeometries (self) ``` ``` QHeaderView.updateSection (self, int?logicalIndex) ``` 這種方法也是一個Qt槽與C + +的簽名`void updateSection(int)`。 ``` int QHeaderView.verticalOffset (self) ``` 從重新實現[QAbstractItemView.verticalOffset](qabstractitemview.html#verticalOffset)( ) 。 返回垂直頭的偏移量。這是0水平的標頭。 **See also** [offset](qheaderview.html#offset)( ) 。 ``` bool QHeaderView.viewportEvent (self, QEvent?e) ``` 從重新實現[QAbstractScrollArea.viewportEvent](qabstractscrollarea.html#viewportEvent)( ) 。 ``` int QHeaderView.visualIndex (self, int?logicalIndex) ``` 返回段由給定指定的可視索引位置_logicalIndex_,否則返回-1 。 隱藏部分仍然具有有效的可視化索引。 **See also** [logicalIndex](qheaderview.html#logicalIndex)( ) 。 ``` int QHeaderView.visualIndexAt (self, int?position) ``` 返回復蓋給定部分的視覺索引_position_在視口中。 **See also** [logicalIndexAt](qheaderview.html#logicalIndexAt)( ) 。 ``` QRect QHeaderView.visualRect (self, QModelIndex?index) ``` [](qrect.html) ``` QRegion QHeaderView.visualRegionForSelection (self, QItemSelection?selection) ``` [ ``` QHeaderView.__len__ (self) ``` * * * ## Qt Signal Documentation ``` void geometriesChanged () ``` 這是該信號的默認超載。 當標頭的幾何形狀發生了變化,這個信號被發射。 這個函數中引入了Qt 4.2中。 ``` void sectionAutoResize (int,QHeaderView::ResizeMode) ``` 這是該信號的默認超載。 這個信號被發射時,部分會自動調整大小。該部分的邏輯索引是通過指定_logicalIndex_,并調整大小模式_mode_。 ](qregion.html) [**See also**](qregion.html) [setResizeMode](qheaderview.html#setResizeMode)()和[stretchLastSection](qheaderview.html#stretchLastSection-prop)( ) 。 ``` void sectionClicked (int) ``` 這是該信號的默認超載。 一個部分被點擊時,這個信號被發射。該部分的邏輯索引是通過指定_logicalIndex_。 注意, sectionPressed信號也將被發射。 **See also** [setClickable](qheaderview.html#setClickable)()和[sectionPressed](qheaderview.html#sectionPressed)( ) 。 ``` void sectionCountChanged (int,int) ``` 這是該信號的默認超載。 這個信號被發射時,部分的數目發生變化,即,當部分被添加或刪除。原始計數被指定_oldCount_,并且由新的計_newCount_。 **See also** [count](qheaderview.html#count)( )[length](qheaderview.html#length)()和[headerDataChanged](qheaderview.html#headerDataChanged)( ) 。 ``` void sectionDoubleClicked (int) ``` 這是該信號的默認超載。 當一個段被雙擊這個信號被發射。該部分的邏輯索引是通過指定_logicalIndex_。 **See also** [setClickable](qheaderview.html#setClickable)( ) 。 ``` void sectionEntered (int) ``` 這是該信號的默認超載。 當光標移過的部分和鼠標左鍵被按下這個信號被發射。該部分的邏輯索引是通過指定_logicalIndex_。 此功能被引入Qt的4.3 。 **See also** [setClickable](qheaderview.html#setClickable)()和[sectionPressed](qheaderview.html#sectionPressed)( ) 。 ``` void sectionHandleDoubleClicked (int) ``` 這是該信號的默認超載。 當一個段被雙擊這個信號被發射。該部分的邏輯索引是通過指定_logicalIndex_。 **See also** [setClickable](qheaderview.html#setClickable)( ) 。 ``` void sectionMoved (int,int,int) ``` 這是該信號的默認超載。 當一個區段被移動這個信號被發射。該部分的邏輯索引是通過指定_logicalIndex_,老指數由_oldVisualIndex_,并且由新的索引位置_newVisualIndex_。 **See also** [moveSection](qheaderview.html#moveSection)( ) 。 ``` void sectionPressed (int) ``` 這是該信號的默認超載。 當一個區段被按下這個信號被發射。該部分的邏輯索引是通過指定_logicalIndex_。 **See also** [setClickable](qheaderview.html#setClickable)( ) 。 ``` void sectionResized (int,int,int) ``` 這是該信號的默認超載。 當一個部分被調整大小,這個信號被發射。該部分的邏輯數由指定_logicalIndex_,舊的大小由_oldSize_,并以新的大小_newSize_。 **See also** [resizeSection](qheaderview.html#resizeSection)( ) 。 ``` void sortIndicatorChanged (int,Qt::SortOrder) ``` 這是該信號的默認超載。 當改變包含排序指示器或指示的順序的部分,這個信號被發射。該部分的邏輯索引是通過指定_logicalIndex_并通過指定的排序順序_order_。 此功能被引入Qt的4.3 。 **See also** [setSortIndicator](qheaderview.html#setSortIndicator)( ) 。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看