1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-30 05:02:52 +08:00
QXlsx/SpreadsheetExample/printview.cpp
Look Skyworker 3623613834 test for ss
2018-06-16 16:28:51 +09:00

26 lines
467 B
C++

// (c) The Qt Company Ltd. BSD License
// Some code is fixed by j2doll.
#ifndef QT_NO_PRINTER
#include <QPrinter>
#endif
#include <QStyleOptionViewItem>
#include "printview.h"
PrintView::PrintView()
{
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
}
void PrintView::print(QPrinter *printer)
{
#ifndef QT_NO_PRINTER
resize(printer->width(), printer->height());
render(printer);
#endif
}