QTableView Class Reference |
A Windows XP style table view. | A Macintosh style table view. | A Plastique style table view. |
See also QTableWidget, Model/View Programming, QAbstractItemModel, and QAbstractItemView.
This property holds the pen style used to draw the grid.
This property holds the style used when drawing the grid (see showGrid).
Access functions:
This property holds whether the grid is shown.
If this property is true a grid is drawn for the table; if the property is false, no grid is drawn. The default value is true.
Access functions:
Constructs a table view with a parent to represent the data.
See also QAbstractItemModel.
Destroys the table view.
Returns the column in which the given x-coordinate, x, in contents coordinates is located.
See also rowAt().
This slot is called whenever columns are added or deleted. The previous number of columns is specified by oldCount, and the new number of columns is specified by newCount.
This slot is called to change the index of the given column in the table view. The old index is specified by oldIndex, and the new index by newIndex.
See also rowMoved().
This slot is called to change the width of the given column. The old width is specified by oldWidth, and the new width by newWidth.
See also rowResized().
Returns the x-coordinate in contents coordinates of the given column.
Returns the width of the given column.
See also setColumnWidth(), resizeColumnToContents(), and rowHeight().
Hide the given column.
See also showColumn() and hideRow().
Hide the given row.
See also showRow() and hideColumn().
Returns the table view's horizontal header.
See also setHorizontalHeader(), verticalHeader(), and QAbstractItemModel::headerData().
Returns the horizontal offset of the items in the table view.
Note that the table view uses the horizontal header section positions to determine the positions of columns in the view.
Reimplemented from QAbstractItemView.
See also verticalOffset().
Returns the index position of the model item corresponding to the table item at position pos in contents coordinates.
Reimplemented from QAbstractItemView.
Returns true if the given column is hidden; otherwise returns false.
See also isRowHidden().
Returns true if the given row is hidden; otherwise returns false.
See also isColumnHidden().
Moves the cursor in accordance with the given cursorAction, using the information provided by the modifiers.
Reimplemented from QAbstractItemView.
See also QAbstractItemView::CursorAction.
Paints the table on receipt of the given paint event event.
Reimplemented from QWidget.
Resizes the given column based on the size hints of the delegate used to render each item in the column.
Resizes all columns based on the size hints of the delegate used to render each item in the columns.
Resizes the given row based on the size hints of the delegate used to render each item in the row.
Resizes all rows based on the size hints of the delegate used to render each item in the rows.
Returns the row in which the given y-coordinate, y, in contents coordinates is located.
See also columnAt().
This slot is called whenever rows are added or deleted. The previous number of rows is specified by oldCount, and the new number of rows is specified by newCount.
Returns the height of the given row.
See also setRowHeight(), resizeRowToContents(), and columnWidth().
This slot is called to change the index of the given row in the table view. The old index is specified by oldIndex, and the new index by newIndex.
See also columnMoved().
This slot is called to change the height of the given row. The old height is specified by oldHeight, and the new height by newHeight.
See also columnResized().
Returns the y-coordinate in contents coordinates of the given row.
Selects the given column in the table view if the current SelectionMode and SelectionBehavior allows columns to be selected.
See also selectRow().
Selects the given row in the table view if the current SelectionMode and SelectionBehavior allows rows to be selected.
See also selectColumn().
If hide is true the given column will be hidden; otherwise it will be shown.
See also isColumnHidden() and setRowHidden().
Sets the width of the given column to be width.
This function was introduced in Qt 4.1.
See also columnWidth().
Sets the widget to use for the vertical header to header.
See also horizontalHeader() and setVerticalHeader().
Sets the height of the given row to be height.
This function was introduced in Qt 4.1.
See also rowHeight().
If hide is true row will be hidden, otherwise it will be shown.
See also isRowHidden() and setColumnHidden().
Selects the items within the given rect and in accordance with the specified selection flags.
Reimplemented from QAbstractItemView.
Sets the widget to use for the horizontal header to header.
See also verticalHeader() and setHorizontalHeader().
Show the given column.
See also hideColumn() and showRow().
Show the given row.
See also hideRow() and showColumn().
Returns the size hint for the given column's width or -1 if there is no model.
If you need to set the width of a given column to a fixed value, call QHeaderView::resizeSection() on the table's horizontal header.
If you reimplement this function in a subclass, note that the value you return is only used when resizeColumnToContents() is called. In that case, if a larger column width is required by either the horizontal header or the item delegate, that width will be used instead.
Reimplemented from QAbstractItemView.
See also QWidget::sizeHint and horizontalHeader().
Returns the size hint for the given row's height or -1 if there is no model.
If you need to set the height of a given row to a fixed value, call QHeaderView::resizeSection() on the table's vertical header.
If you reimplement this function in a subclass, note that the value you return is only used when resizeRowToContents() is called. In that case, if a larger row height is required by either the vertical header or the item delegate, that width will be used instead.
Reimplemented from QAbstractItemView.
See also QWidget::sizeHint and verticalHeader().
Sorts the model by the values in the given column.
Returns the table view's vertical header.
See also setVerticalHeader(), horizontalHeader(), and QAbstractItemModel::headerData().
Returns the vertical offset of the items in the table view.
Note that the table view uses the vertical header section positions to determine the positions of rows in the view.
Reimplemented from QAbstractItemView.
See also horizontalOffset().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.1 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com