3
How can I get the data from a TableView
add to layout html
and print with QPrinter
?
Code:
QString html;
html = "<div>Titulo</div>"
"<div>etc</div>"
"<div>etc</div>"
"<div>"+ ui->tableView->+"</div>"; << tableView
QPrinter printer;
QPainter painter;
painter.begin(&printer);
painter.drawText(100, 100, 500, 500,Qt::AlignLeft | Qt::AlignTop, html);
painter.end();