QTableWidget Class Reference
|
![]() | ![]() | ![]() |
A Windows XP style table widget. | A Macintosh style table widget. | A Plastique style table widget. |
See also QTableWidgetItem, QTableView, and Model/View Programming.
This property holds the number of columns in the table.
By default, for a table constructed without row and column counts, this property contains a value of 0.
Функции доступа:
This property holds the number of rows in the table.
By default, for a table constructed without row and column counts, this property contains a value of 0.
Функции доступа:
Creates a new table view with the given parent.
Creates a new table view with the given rows and columns, and with the given parent.
Destroys this QTableWidget.
This signal is emitted when the cell specified by row and column has been activated
Эта функция была введена в Qt 4.1.
This signal is emitted whenever the data of the item in the cell specified by row and column has changed.
Эта функция была введена в Qt 4.1.
This signal is emitted whenever a cell in the table is clicked. The row and column specified is the cell that was clicked.
Эта функция была введена в Qt 4.1.
This signal is emitted whenever a cell in the table is double clicked. The row and column specified is the cell that was double clicked.
Эта функция была введена в Qt 4.1.
This signal is emitted when the mouse cursor enters a cell. The cell is specified by row and column.
This signal is only emitted when mouseTracking is turned on, or when a mouse button is pressed while moving into an item.
Эта функция была введена в Qt 4.1.
This signal is emitted whenever a cell in the table is pressed. The row and column specified is the cell that was pressed.
Эта функция была введена в Qt 4.1.
Returns the widget displayed in the cell in the given row and column.
Note: The table takes ownership of the widget.
Эта функция была введена в Qt 4.1.
See also setCellWidget().
Removes all items in the view. This will also remove all selections. The table dimensions stay the same.
Removes all items not in the headers from the view. This will also remove all selections. The table dimensions stay the same.
Эта функция была введена в Qt 4.2.
Closes the persistent editor for item.
See also openPersistentEditor().
Returns the column for the item.
This signal is emitted whenever the current cell changes. The cell specified by previousRow and previousColumn is the cell that previously had the focus, the cell specified by currentRow and currentColumn is the new current cell.
Эта функция была введена в Qt 4.1.
Returns the column of the current item.
See also currentRow() and setCurrentCell().
Возвращает текущий элемент.
See also setCurrentItem().
This signal is emitted whenever the current item changes. The previous item is the item that previously had the focus, current is the new current item.
Returns the row of the current item.
See also currentColumn() and setCurrentCell().
Handles the data supplied by a drag and drop operation that ended with the given action in the given row and column. Returns true if the data and action can be handled by the model; otherwise returns false.
See also supportedDropActions().
Starts editing the item if it is editable.
Finds items that matches the text using the given flags.
Returns the horizontal header item for column, column, if one has been set; otherwise returns 0.
See also setHorizontalHeaderItem().
Returns the QModelIndex assocated with the given item.
Inserts an empty column into the table at column.
Inserts an empty row into the table at row.
Returns the item for the given row and column if one has been set; otherwise returns 0.
Смотрите также setItem().
This signal is emitted when the specified item has been activated
Returns a pointer to the item at the given point, or returns 0 if point is not covered by an item in the table widget.
Смотрите также item().
Returns the item at the position equivalent to QPoint(ax, ay) in the table widget's coordinate system, or returns 0 if the specified point is not covered by an item in the table widget.
Смотрите также item().
This signal is emitted whenever the data of item has changed.
This signal is emitted whenever an item in the table is clicked. The item specified is the item that was clicked.
This signal is emitted whenever an item in the table is double clicked. The item specified is the item that was double clicked.
This signal is emitted when the mouse cursor enters an item. The item is the item entered.
This signal is only emitted when mouseTracking is turned on, or when a mouse button is pressed while moving into an item.
Returns a pointer to the QTableWidgetItem assocated with the given index.
This signal is emitted whenever an item in the table is pressed. The item specified is the item that was pressed.
Returns the item prototype used by the table.
See also setItemPrototype().
This signal is emitted whenever the selection changes.
See also selectedItems() and isItemSelected().
Returns a list of pointers to the items contained in the data object. If the object was not created by a QTreeWidget in the same process, the list is empty.
Returns an object that contains a serialized description of the specified items. The format used to describe the items is obtained from the mimeTypes() function.
If the list of items is empty, 0 is returned rather than a serialized empty list.
Returns a list of MIME types that can be used to describe a list of tablewidget items.
See also mimeData().
Opens an editor for the give item. The editor remains open after editing.
See also closePersistentEditor().
Removes the widget set on the cell indicated by row and column.
Эта функция была введена в Qt 4.3.
Removes the column column and all its items from the table.
Removes the row row and all its items from the table.
Returns the row for the item.
Scrolls the view if necessary to ensure that the item is visible. The hint parameter specifies more precisely where the item should be located after the operation.
Returns a list of all selected items.
This function returns a list of pointers to the contents of the selected cells. Use the selectedIndexes() function to retrieve the complete selection including empty cells.
See also selectedIndexes().
Returns a list of all selected ranges.
See also QTableWidgetSelectionRange.
Sets the given widget to be displayed in the cell in the given row and column, passing the ownership of the widget to the table.
If cell widget A is replaced with cell widget B, cell widget A will be deleted. For example, in the code snippet below, the QLineEdit object will be deleted.
setCellWidget(index, new QLineEdit); ... setCellWidget(index, new QTextEdit);
Эта функция была введена в Qt 4.1.
See also cellWidget().
Sets the current cell to be the cell at position (row, column).
Depending on the current selection mode, the cell may also be selected.
Эта функция была введена в Qt 4.1.
See also setCurrentItem(), currentRow(), and currentColumn().
Sets the current cell to be the cell at position (row, column), using the given command.
Эта функция была введена в Qt 4.4.
See also setCurrentItem(), currentRow(), and currentColumn().
Sets the current item to item.
Depending on the current selection mode, the item may also be selected.
See also currentItem() and setCurrentCell().
Sets the current item to be item, using the given command.
Эта функция была введена в Qt 4.4.
See also currentItem() and setCurrentCell().
Sets the horizontal header item for column column to item.
See also horizontalHeaderItem().
Sets the horizontal header labels using labels.
Sets the item for the given row and column to item.
The table takes ownership of the item.
Note that if sorting is enabled (see sortingEnabled) and column is the current sort column, the row will be moved to the sorted position determined by item.
If you want to set several items of a particular row (say, by calling setItem() in a loop), you may want to turn off sorting before doing so, and turn it back on afterwards; this will allow you to use the same row argument for all items in the same row (i.e. setItem() will not move the row).
See also item() and takeItem().
Sets the item prototype for the table to the specified item.
The table widget will use the item prototype clone function when it needs to create a new table item. For example when the user is editing editing in an empty cell. This is useful when you have a QTableWidgetItem subclass and want to make sure that QTableWidget creates instances of your subclass.
The table takes ownership of the prototype.
See also itemPrototype().
Selects or deselects the range depending on select.
Sets the vertical header item for row row to item.
See also verticalHeaderItem().
Sets the vertical header labels using labels.
Sorts all the rows in the table widget based on column and order.
Returns the drop actions supported by this view.
Смотрите также Qt::DropActions.
Removes the horizontal header item at column from the header without deleting it.
Эта функция была введена в Qt 4.1.
Removes the item at row and column from the table without deleting it.
Removes the vertical header item at row from the header without deleting it.
Эта функция была введена в Qt 4.1.
Returns the vertical header item for row row.
See also setVerticalHeaderItem().
Returns the visual column of the given logicalColumn.
Returns the rectangle on the viewport occupied by the item at item.
Returns the visual row of the given logicalRow.
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Торговые марки | Qt 4.5.3 |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |