ok, i need your help again. i want to print out my whole qtable, with headers.
but im only able to print out the rows/cols without header, using a QTextDocument.
how can i put the headers in?
for(int row=0;row<getMaxRow();row++)
{
for(int col=0;col<getMaxCol();col++)
{
//QTextTableCell hHeader = docTable->cellAt(0,col);
//hHeader.setFormat(cellFormat);
//hHeader.firstCursorPosition().insertText(table->horizontalHeaderItem(table->columnAt(col))->text());
cell.setFormat(cellFormat);
cell.firstCursorPosition().insertText(table->item(row+1,col+1)->text());
}
}
for(int row=0;row<getMaxRow();row++)
{
for(int col=0;col<getMaxCol();col++)
{
//QTextTableCell hHeader = docTable->cellAt(0,col);
//hHeader.setFormat(cellFormat);
//hHeader.firstCursorPosition().insertText(table->horizontalHeaderItem(table->columnAt(col))->text());
QTextTableCell cell = docTable->cellAt(row+1,col+1);
cell.setFormat(cellFormat);
cell.firstCursorPosition().insertText(table->item(row+1,col+1)->text());
}
}
To copy to clipboard, switch view to plain text mode
this doesnt work
Bookmarks