void
|
appendColumns ( int
count )
|
void
|
appendRows ( int
count )
|
QTextTableCell
|
cellAt ( int
row, int
column ) const
|
QTextTableCell
|
cellAt ( int
position ) const
|
QTextTableCell
|
cellAt ( const QTextCursor &
cursor ) const
|
int
|
columns () const
|
QTextTableFormat
|
format () const
|
void
|
insertColumns ( int
index, int
columns )
|
void
|
insertRows ( int
index, int
rows )
|
void
|
mergeCells ( int
row, int
column, int
numRows, int
numCols )
|
void
|
mergeCells ( const QTextCursor &
cursor )
|
void
|
removeColumns ( int
index, int
columns )
|
void
|
removeRows ( int
index, int
rows )
|
void
|
resize ( int
rows, int
columns )
|
QTextCursor
|
rowEnd ( const QTextCursor &
cursor ) const
|
QTextCursor
|
rowStart ( const QTextCursor &
cursor ) const
|
int
|
rows () const
|
void
|
setFormat ( const QTextTableFormat &
format )
|
void
|
splitCell ( int
row, int
column, int
numRows, int
numCols )
|
QTextCursor cursor(editor->textCursor());
cursor.movePosition(QTextCursor::Start);
QTextTable *table = cursor.insertTable(rows, columns, tableFormat);
假设我们有2*3的表,合并第一行的两列,我们引用mergeCells()当
row = 0,
column = 0,
numRows = 1 and
numColumns = 2.
table->mergeCells(0, 0, 1, 2);
|
|
得到下面大的表。分开它,我们使用splitCell()参数
numRows and
numCols = 1.
table->splitCell(0, 0, 1, 1);
|
|
结果.
|