The QTextTableCell class represents the properties of a cell in a QTextTable. More...
#include <QTextTableCell>
Note: All functions in this class are reentrant.
The QTextTableCell class represents the properties of a cell in a 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 QTextTable and QTextTableFormat.
Constructs an invalid table cell.
See also isValid().
Copy constructor. Creates a new QTextTableCell object based on the other cell.
Destroys the table cell.
Returns a frame iterator pointing to the beginning of the table's cell.
See also end().
Returns the number of the column in the table that contains this cell.
See also row().
Returns the number of columns this cell spans. The default is 1.
See also rowSpan().
Returns a frame iterator pointing to the end of the table's cell.
See also begin().
Returns the first valid cursor position in this cell.
See also lastCursorPosition().
Returns the cell's character format.
See also setFormat().
Returns true if this is a valid table cell; otherwise returns false.
Returns the last valid cursor position in this cell.
See also firstCursorPosition().
Returns the number of the row in the table that contains this cell.
See also column().
Returns the number of rows this cell spans. The default is 1.
See also columnSpan().
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(Qt::blue); cell.setFormat(format);
Note that the cell's row or column span cannot be changed through this function. You have to use QTextTable::mergeCells and QTextTable::splitCell instead.
This function was introduced in Qt 4.2.
See also format().
Returns the index of the tableCell's format in the document's internal list of formats.
This function was introduced in Qt 4.5.
See also QTextDocument::allFormats().
Returns true if this cell object and the other cell object describe different cells; otherwise returns false.
Assigns the other table cell to this table cell.
Returns true if this cell object and the other cell object describe the same cell; otherwise returns false.