<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # QListView Class Reference ## [[QtGui](index.htm) module] 的而QListView類提供了一個列表或圖標視圖到模型。[More...](#details) 繼承[QAbstractItemView](qabstractitemview.html)。 通過繼承[QHelpIndexWidget](qhelpindexwidget.html),[QListWidget](qlistwidget.html)和[QUndoView](qundoview.html)。 ### Types * `enum Flow { LeftToRight, TopToBottom }` * `enum LayoutMode { SinglePass, Batched }` * `enum Movement { Static, Free, Snap }` * `enum ResizeMode { Fixed, Adjust }` * `enum ViewMode { ListMode, IconMode }` ### Methods * `__init__ (self, QWidget?parent?=?None)` * `int batchSize (self)` * `clearPropertyFlags (self)` * `currentChanged (self, QModelIndex?current, QModelIndex?previous)` * `dataChanged (self, QModelIndex?topLeft, QModelIndex?bottomRight)` * `dragLeaveEvent (self, QDragLeaveEvent?e)` * `dragMoveEvent (self, QDragMoveEvent?e)` * `dropEvent (self, QDropEvent?e)` * `bool event (self, QEvent?e)` * `Flow flow (self)` * `QSize gridSize (self)` * `int horizontalOffset (self)` * `QModelIndex indexAt (self, QPoint?p)` * `bool isIndexHidden (self, QModelIndex?index)` * `bool isRowHidden (self, int?row)` * `bool isSelectionRectVisible (self)` * `bool isWrapping (self)` * `LayoutMode layoutMode (self)` * `int modelColumn (self)` * `mouseMoveEvent (self, QMouseEvent?e)` * `mouseReleaseEvent (self, QMouseEvent?e)` * `QModelIndex moveCursor (self, QAbstractItemView.CursorAction?cursorAction, Qt.KeyboardModifiers?modifiers)` * `Movement movement (self)` * `paintEvent (self, QPaintEvent?e)` * `QRect rectForIndex (self, QModelIndex?index)` * `reset (self)` * `resizeEvent (self, QResizeEvent?e)` * `ResizeMode resizeMode (self)` * `rowsAboutToBeRemoved (self, QModelIndex?parent, int?start, int?end)` * `rowsInserted (self, QModelIndex?parent, int?start, int?end)` * `scrollContentsBy (self, int?dx, int?dy)` * `scrollTo (self, QModelIndex?index, QAbstractItemView.ScrollHint?hint?=?QAbstractItemView.EnsureVisible)` * `list-of-QModelIndex selectedIndexes (self)` * `selectionChanged (self, QItemSelection?selected, QItemSelection?deselected)` * `setBatchSize (self, int?batchSize)` * `setFlow (self, Flow?flow)` * `setGridSize (self, QSize?size)` * `setLayoutMode (self, LayoutMode?mode)` * `setModelColumn (self, int?column)` * `setMovement (self, Movement?movement)` * `setPositionForIndex (self, QPoint?position, QModelIndex?index)` * `setResizeMode (self, ResizeMode?mode)` * `setRootIndex (self, QModelIndex?index)` * `setRowHidden (self, int?row, bool?hide)` * `setSelection (self, QRect?rect, QItemSelectionModel.SelectionFlags?command)` * `setSelectionRectVisible (self, bool?show)` * `setSpacing (self, int?space)` * `setUniformItemSizes (self, bool?enable)` * `setViewMode (self, ViewMode?mode)` * `setWordWrap (self, bool?on)` * `setWrapping (self, bool?enable)` * `int spacing (self)` * `startDrag (self, Qt.DropActions?supportedActions)` * `timerEvent (self, QTimerEvent?e)` * `bool uniformItemSizes (self)` * `updateGeometries (self)` * `int verticalOffset (self)` * `ViewMode viewMode (self)` * `QStyleOptionViewItem viewOptions (self)` * `QRect visualRect (self, QModelIndex?index)` * `QRegion visualRegionForSelection (self, QItemSelection?selection)` * `bool wordWrap (self)` ### Qt Signals * `void indexesMoved (const QModelIndexList&)` * * * ## Detailed Description 的而QListView類提供了一個列表或圖標視圖到模型。 一而QListView呈現存儲在一個模型中的項目,無論是作為一個簡單的非層次結構列表,或作為圖標的集合。這個類是用來提供以前由提供的列表和圖標視圖`QListBox`和`QIconView`類,但通過使用Qt的模型/視圖結構中提供的更靈活的方法。 的而QListView類中的一個[Model/View Classes](index.htm)并且是Qt的一部分[model/view framework](index.htm)。 這種觀點不顯示水平或垂直頭,顯示項目列表與水平頭,使用[QTreeView](qtreeview.html)代替。 而QListView實現由定義的接口[QAbstractItemView](qabstractitemview.html)類以允許其顯示由從派生模型提供數據[QAbstractItemModel](qabstractitemmodel.html)類。 在:在列表視圖中的項目,可以使用兩種視圖模式之一顯示[ListMode](qlistview.html#ViewMode-enum),該項目顯示在一個簡單的列表形式,在[IconMode](qlistview.html#ViewMode-enum),列表視圖采用的形式_icon view_在該項目在文件管理器中顯示包含的文件圖標。默認情況下,列表視圖中[ListMode](qlistview.html#ViewMode-enum)。要更改視圖模式下,使用[setViewMode](qlistview.html#viewMode-prop)( )函數,并確定當前視圖模式下,使用[viewMode](qlistview.html#viewMode-prop)( ) 。 在這些視圖項目,由指定的方向布局[flow](qlistview.html#flow-prop)列表視圖的( ) 。該條目可以被固定在適當位置,或者可以移動,這取決于視圖的[movement](qlistview.html#movement-prop)( )狀態。 如果在模型中的項,不能完全在流動方向上布置,它們可以在視圖窗口部件的邊界被包裹,這取決于[isWrapping](qlistview.html#isWrapping-prop)( ) 。當項目正由一個圖標視圖中表示此屬性很有用。 該[resizeMode](qlistview.html#resizeMode-prop)()和[layoutMode](qlistview.html#layoutMode-prop)( )治理項目的布局方式和時間。項目按他們的間隔[spacing](qlistview.html#spacing-prop)() ,并能大小的由指定的名義網格內的存在[gridSize](qlistview.html#gridSize-prop)( ) 。本項目可以根據被渲染為或大或小的圖標[iconSize](qabstractitemview.html#iconSize-prop)( ) 。 | ![Screenshot of a Windows XP style list view](https://img.kancloud.cn/06/2c/062c4a138848332334f63be434debdef_253x174.png) | ![Screenshot of a Macintosh style table view](https://img.kancloud.cn/c4/99/c499dc7eb8038b1381c37101e8168b96_243x173.png) | ![Screenshot of a Plastique style table view](https://img.kancloud.cn/44/92/4492b58e098bbb573a08a01e1455bae0_251x175.png) | | A [Windows XP style](index.htm) list view. | A [Macintosh style](index.htm) list view. | A [Plastique style](index.htm) list view. | ### Improving Performance 它可以給出關于它正在處理,以便顯示大量項目時,以改善其性能的數據的視圖的提示。可以采取一種方法對于旨在與相等尺寸的顯示項目的觀點是設置[uniformItemSizes](qlistview.html#uniformItemSizes-prop)屬性設置為True 。 * * * ## Type Documentation ``` QListView.Flow ``` | Constant | Value | Description | | --- | --- | --- | | `QListView.LeftToRight` | `0` | 該項目奠定了在視圖中從左邊到右邊。 | | `QListView.TopToBottom` | `1` | 該項目的布局視圖從頂部至底部。 | ``` QListView.LayoutMode ``` | Constant | Value | Description | | --- | --- | --- | | `QListView.SinglePass` | `0` | 該項目奠定了一下子。 | | `QListView.Batched` | `1` | 該項目在分批布局[batchSize](qlistview.html#batchSize-prop)項目。 | **See also** [batchSize](qlistview.html#batchSize-prop)。 ``` QListView.Movement ``` | Constant | Value | Description | | --- | --- | --- | | `QListView.Static` | `0` | 該項目不能被用戶移動。 | | `QListView.Free` | `1` | 該項目可以由用戶自由移動。 | | `QListView.Snap` | `2` | 該項目捕捉到移動時指定的網格;見[setGridSize](qlistview.html#gridSize-prop)( ) 。 | ``` QListView.ResizeMode ``` | Constant | Value | Description | | --- | --- | --- | | `QListView.Fixed` | `0` | 該項目將只在第一次的視圖顯示進行布局。 | | `QListView.Adjust` | `1` | 該項目將在每次視圖調整大小時布局。 | ``` QListView.ViewMode ``` | Constant | Value | Description | | --- | --- | --- | | `QListView.ListMode` | `0` | 該項目的布局使用[TopToBottom](qlistview.html#Flow-enum)流,具有體積小,靜態運動 | | `QListView.IconMode` | `1` | 該項目的布局使用[LeftToRight](qlistview.html#Flow-enum)流,具有大尺寸和自由流動 | * * * ## Method Documentation ``` QListView.__init__ (self, QWidget?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 創建一個新的[QListView](qlistview.html)用給定的_parent_查看模型。使用[setModel](qabstractitemview.html#setModel)()來設定模型。 ``` int QListView.batchSize (self) ``` ``` QListView.clearPropertyFlags (self) ``` 清除[QListView](qlistview.html)特定的屬性標志。看[viewMode](qlistview.html#viewMode-prop)。 屬性繼承自[QAbstractItemView](qabstractitemview.html)不包括由酒店的標志。具體來說,[dragEnabled](qabstractitemview.html#dragEnabled-prop)和[acceptsDrops](qwidget.html#acceptDrops-prop)通過計算[QListView](qlistview.html)當調用[setMovement](qlistview.html#movement-prop)()或[setViewMode](qlistview.html#viewMode-prop)( ) 。 ``` QListView.currentChanged (self, QModelIndex?current, QModelIndex?previous) ``` 從重新實現[QAbstractItemView.currentChanged](qabstractitemview.html#currentChanged)( ) 。 ``` QListView.dataChanged (self, QModelIndex?topLeft, QModelIndex?bottomRight) ``` 從重新實現[QAbstractItemView.dataChanged](qabstractitemview.html#dataChanged)( ) 。 ``` QListView.dragLeaveEvent (self, QDragLeaveEvent?e) ``` 從重新實現[QWidget.dragLeaveEvent](qwidget.html#dragLeaveEvent)( ) 。 ``` QListView.dragMoveEvent (self, QDragMoveEvent?e) ``` 從重新實現[QWidget.dragMoveEvent](qwidget.html#dragMoveEvent)( ) 。 ``` QListView.dropEvent (self, QDropEvent?e) ``` 從重新實現[QWidget.dropEvent](qwidget.html#dropEvent)( ) 。 ``` bool QListView.event (self, QEvent?e) ``` 從重新實現[QObject.event](qobject.html#event)( ) 。 ``` Flow QListView.flow (self) ``` [](qlistview.html#Flow-enum) ``` QSize QListView.gridSize (self) ``` [ ``` int QListView.horizontalOffset (self) ``` ](qsize.html) [從重新實現](qsize.html)[QAbstractItemView.horizontalOffset](qabstractitemview.html#horizontalOffset)( ) 。 ``` QModelIndex QListView.indexAt (self, QPoint?p) ``` [](qmodelindex.html) [從重新實現](qmodelindex.html)[QAbstractItemView.indexAt](qabstractitemview.html#indexAt)( ) 。 ``` bool QListView.isIndexHidden (self, QModelIndex?index) ``` 從重新實現[QAbstractItemView.isIndexHidden](qabstractitemview.html#isIndexHidden)( ) 。 ``` bool QListView.isRowHidden (self, int?row) ``` 返回True如果_row_被隱藏,否則返回False 。 ``` bool QListView.isSelectionRectVisible (self) ``` ``` bool QListView.isWrapping (self) ``` ``` LayoutMode QListView.layoutMode (self) ``` [ ``` int QListView.modelColumn (self) ``` ``` QListView.mouseMoveEvent (self, QMouseEvent?e) ``` ](qlistview.html#LayoutMode-enum) [從重新實現](qlistview.html#LayoutMode-enum)[QWidget.mouseMoveEvent](qwidget.html#mouseMoveEvent)( ) 。 ``` QListView.mouseReleaseEvent (self, QMouseEvent?e) ``` 從重新實現[QWidget.mouseReleaseEvent](qwidget.html#mouseReleaseEvent)( ) 。 ``` QModelIndex QListView.moveCursor (self, QAbstractItemView.CursorAction?cursorAction, Qt.KeyboardModifiers?modifiers) ``` [](qmodelindex.html) [從重新實現](qmodelindex.html)[QAbstractItemView.moveCursor](qabstractitemview.html#moveCursor)( ) 。 ``` Movement QListView.movement (self) ``` [ ``` QListView.paintEvent (self, QPaintEvent?e) ``` ](qlistview.html#Movement-enum) [從重新實現](qlistview.html#Movement-enum)[QWidget.paintEvent](qwidget.html#paintEvent)( ) 。 ``` QRect QListView.rectForIndex (self, QModelIndex?index) ``` [ 返回該項目的位置的矩形_index_在模型中。矩形是在內容坐標。 ](qrect.html) [**See also**](qrect.html) [visualRect](qlistview.html#visualRect)( ) 。 ``` QListView.reset (self) ``` ``` QListView.resizeEvent (self, QResizeEvent?e) ``` 從重新實現[QWidget.resizeEvent](qwidget.html#resizeEvent)( ) 。 ``` ResizeMode QListView.resizeMode (self) ``` [ ``` QListView.rowsAboutToBeRemoved (self, QModelIndex?parent, int?start, int?end) ``` ](qlistview.html#ResizeMode-enum) [從重新實現](qlistview.html#ResizeMode-enum)[QAbstractItemView.rowsAboutToBeRemoved](qabstractitemview.html#rowsAboutToBeRemoved)( ) 。 ``` QListView.rowsInserted (self, QModelIndex?parent, int?start, int?end) ``` 從重新實現[QAbstractItemView.rowsInserted](qabstractitemview.html#rowsInserted)( ) 。 ``` QListView.scrollContentsBy (self, int?dx, int?dy) ``` ``` QListView.scrollTo (self, QModelIndex?index, QAbstractItemView.ScrollHint?hint?=?QAbstractItemView.EnsureVisible) ``` 從重新實現[QAbstractItemView.scrollTo](qabstractitemview.html#scrollTo)( ) 。 ``` list-of-QModelIndex QListView.selectedIndexes (self) ``` 從重新實現[QAbstractItemView.selectedIndexes](qabstractitemview.html#selectedIndexes)( ) 。 ``` QListView.selectionChanged (self, QItemSelection?selected, QItemSelection?deselected) ``` 從重新實現[QAbstractItemView.selectionChanged](qabstractitemview.html#selectionChanged)( ) 。 ``` QListView.setBatchSize (self, int?batchSize) ``` ``` QListView.setFlow (self, Flow?flow) ``` ``` QListView.setGridSize (self, QSize?size) ``` ``` QListView.setLayoutMode (self, LayoutMode?mode) ``` ``` QListView.setModelColumn (self, int?column) ``` ``` QListView.setMovement (self, Movement?movement) ``` ``` QListView.setPositionForIndex (self, QPoint?position, QModelIndex?index) ``` 設置在該項目中的內容位置_index_在模型中,以給定的_position_。如果列表視圖的運動模式是靜態的還是它的視圖模式是[ListView](index.htm),此功能不會有任何效果。 這個函數是Qt 4.1中引入。 ``` QListView.setResizeMode (self, ResizeMode?mode) ``` ``` QListView.setRootIndex (self, QModelIndex?index) ``` ``` QListView.setRowHidden (self, int?row, bool?hide) ``` If _hide_誠然,在給定_row_將被隱藏,否則_row_將顯示。 **See also** [isRowHidden](qlistview.html#isRowHidden)( ) 。 ``` QListView.setSelection (self, QRect?rect, QItemSelectionModel.SelectionFlags?command) ``` 從重新實現[QAbstractItemView.setSelection](qabstractitemview.html#setSelection)( ) 。 ``` QListView.setSelectionRectVisible (self, bool?show) ``` ``` QListView.setSpacing (self, int?space) ``` ``` QListView.setUniformItemSizes (self, bool?enable) ``` ``` QListView.setViewMode (self, ViewMode?mode) ``` ``` QListView.setWordWrap (self, bool?on) ``` ``` QListView.setWrapping (self, bool?enable) ``` ``` int QListView.spacing (self) ``` ``` QListView.startDrag (self, Qt.DropActions?supportedActions) ``` 從重新實現[QAbstractItemView.startDrag](qabstractitemview.html#startDrag)( ) 。 ``` QListView.timerEvent (self, QTimerEvent?e) ``` 從重新實現[QObject.timerEvent](qobject.html#timerEvent)( ) 。 ``` bool QListView.uniformItemSizes (self) ``` ``` QListView.updateGeometries (self) ``` 從重新實現[QAbstractItemView.updateGeometries](qabstractitemview.html#updateGeometries)( ) 。 ``` int QListView.verticalOffset (self) ``` 從重新實現[QAbstractItemView.verticalOffset](qabstractitemview.html#verticalOffset)( ) 。 ``` ViewMode QListView.viewMode (self) ``` [](qlistview.html#ViewMode-enum) ``` QStyleOptionViewItem QListView.viewOptions (self) ``` [](qstyleoptionviewitem.html) [從重新實現](qstyleoptionviewitem.html)[QAbstractItemView.viewOptions](qabstractitemview.html#viewOptions)( ) 。 ``` QRect QListView.visualRect (self, QModelIndex?index) ``` [](qrect.html) [從重新實現](qrect.html)[QAbstractItemView.visualRect](qabstractitemview.html#visualRect)( ) 。 ``` QRegion QListView.visualRegionForSelection (self, QItemSelection?selection) ``` [](qregion.html) [從重新實現](qregion.html)[QAbstractItemView.visualRegionForSelection](qabstractitemview.html#visualRegionForSelection)( ) 。 由于4.7 ,返回的區域僅包含矩形相交(或計入)的視口。 ``` bool QListView.wordWrap (self) ``` * * * ## Qt Signal Documentation ``` void indexesMoved (const QModelIndexList&) ``` 這是該信號的默認超載。 指定時,這個信號被發射_indexes_移動在視圖中。 這個函數中引入了Qt 4.2中。
                  <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>

                              哎呀哎呀视频在线观看