QColumnView¶
The
QColumnView
class provides a model/view implementation of a column view. More…
Synopsis¶
Functions¶
def
columnWidths
()def
initializeColumn
(column)def
previewWidget
()def
resizeGripsVisible
()def
setColumnWidths
(list)def
setPreviewWidget
(widget)def
setResizeGripsVisible
(visible)
Virtual functions¶
def
createColumn
(rootIndex)
Signals¶
def
updatePreviewWidget
(index)
Detailed Description¶
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.The
QColumnView
class is one of the Model/View Classes and is part of Qt’s model/view framework .
QColumnView
implements the interfaces defined by theQAbstractItemView
class to allow it to display data provided by models derived from theQAbstractItemModel
class.See also
- class PySide2.QtWidgets.QColumnView([parent=None])¶
- param parent:
Constructs a column view with a
parent
to represent a model’s data. UsesetModel()
to set the model.See also
QAbstractItemModel
- PySide2.QtWidgets.QColumnView.columnWidths()¶
- Return type:
Returns a list of the width of all the columns in this view.
See also
- PySide2.QtWidgets.QColumnView.createColumn(rootIndex)¶
- Parameters:
rootIndex –
PySide2.QtCore.QModelIndex
- Return type:
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.
QColumnView
will automatically take ownership of the widget.See also
- PySide2.QtWidgets.QColumnView.initializeColumn(column)¶
- Parameters:
column –
PySide2.QtWidgets.QAbstractItemView
Copies the behavior and options of the column view and applies them to the
column
such as theiconSize()
,textElideMode()
andalternatingRowColors()
. This can be useful when reimplementingcreateColumn()
.See also
- PySide2.QtWidgets.QColumnView.previewWidget()¶
- Return type:
Returns the preview widget, or
None
if there is none.See also
- PySide2.QtWidgets.QColumnView.resizeGripsVisible()¶
- Return type:
bool
This property holds the way to specify if the list views gets resize grips or not.
By default,
visible
is set to trueSee also
setRootIndex()
- PySide2.QtWidgets.QColumnView.setColumnWidths(list)¶
- Parameters:
list –
Sets the column widths to the values given in the
list
. Extra values in the list are kept and used when the columns are created.If list contains too few values, only width of the rest of the columns will not be modified.
See also
- PySide2.QtWidgets.QColumnView.setPreviewWidget(widget)¶
- Parameters:
widget –
PySide2.QtWidgets.QWidget
Sets the preview
widget
.The
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.See also
- PySide2.QtWidgets.QColumnView.setResizeGripsVisible(visible)¶
- Parameters:
visible – bool
This property holds the way to specify if the list views gets resize grips or not.
By default,
visible
is set to trueSee also
setRootIndex()
- PySide2.QtWidgets.QColumnView.updatePreviewWidget(index)¶
- Parameters:
index –
PySide2.QtCore.QModelIndex
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.