QTextTableCell¶
The QTextTableCell
class represents the properties of a cell in a QTextTable
. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
begin
()def
column
()def
columnSpan
()def
end
()def
firstCursorPosition
()def
firstPosition
()def
format
()def
isValid
()def
lastCursorPosition
()def
lastPosition
()def
row
()def
rowSpan
()def
setFormat
(format)def
tableCellFormatIndex
()
Detailed Description¶
Table cells are pieces of document structure that belong to a table. The table orders cells into particular rows and columns; cells can also span multiple columns and rows.
Cells are usually created when a table is inserted into a document with insertTable()
, but they are also created and destroyed when a table is resized.
Cells contain information about their location in a table; you can obtain the row()
and column()
numbers of a cell, and its rowSpan()
and columnSpan()
.
The format()
of a cell describes the default character format of its contents. The firstCursorPosition()
and lastCursorPosition()
functions are used to obtain the extent of the cell in the document.
See also
- class PySide6.QtGui.QTextTableCell¶
PySide6.QtGui.QTextTableCell(o)
- Parameters
Constructs an invalid table cell.
See also
Copy constructor. Creates a new QTextTableCell
object based on the other
cell.
- PySide6.QtGui.QTextTableCell.begin()¶
- Return type
Returns a frame iterator pointing to the beginning of the table’s cell.
See also
- PySide6.QtGui.QTextTableCell.column()¶
- Return type
int
Returns the number of the column in the table that contains this cell.
See also
- PySide6.QtGui.QTextTableCell.columnSpan()¶
- Return type
int
Returns the number of columns this cell spans. The default is 1.
See also
- PySide6.QtGui.QTextTableCell.end()¶
- Return type
Returns a frame iterator pointing to the end of the table’s cell.
See also
- PySide6.QtGui.QTextTableCell.firstCursorPosition()¶
- Return type
Returns the first valid cursor position in this cell.
See also
- PySide6.QtGui.QTextTableCell.firstPosition()¶
- Return type
int
- PySide6.QtGui.QTextTableCell.format()¶
- Return type
Returns the cell’s character format.
See also
- PySide6.QtGui.QTextTableCell.isValid()¶
- Return type
bool
Returns true
if this is a valid table cell; otherwise returns false.
- PySide6.QtGui.QTextTableCell.lastCursorPosition()¶
- Return type
Returns the last valid cursor position in this cell.
See also
- PySide6.QtGui.QTextTableCell.lastPosition()¶
- Return type
int
- PySide6.QtGui.QTextTableCell.__ne__(other)¶
- Parameters
other –
PySide6.QtGui.QTextTableCell
- Return type
bool
Returns true
if this cell object and the other
cell object describe different cells; otherwise returns false
.
- PySide6.QtGui.QTextTableCell.__eq__(other)¶
- Parameters
other –
PySide6.QtGui.QTextTableCell
- Return type
bool
Returns true
if this cell object and the other
cell object describe the same cell; otherwise returns false
.
- PySide6.QtGui.QTextTableCell.row()¶
- Return type
int
Returns the number of the row in the table that contains this cell.
See also
- PySide6.QtGui.QTextTableCell.rowSpan()¶
- Return type
int
Returns the number of rows this cell spans. The default is 1.
See also
- PySide6.QtGui.QTextTableCell.setFormat(format)¶
- Parameters
format –
PySide6.QtGui.QTextCharFormat
Sets the cell’s character format to format
. This can for example be used to change the background color of the entire cell:
QTextTableCell
cell = table->cellAt(2, 3); QTextCharFormat
format = cell. format()
; format.setBackground( blue
); cell.(format);
Note that the cell’s row or column span cannot be changed through this function. You have to use mergeCells
and splitCell
instead.
See also
- PySide6.QtGui.QTextTableCell.tableCellFormatIndex()¶
- Return type
int
Returns the index of the tableCell’s format in the document’s internal list of formats.
See also
© 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.