mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Enable Qt::AA_EnableHighDpiScaling and fix print bug, thanks Gabberworld for this patch.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5242 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -354,7 +354,25 @@ void DiagramPrintDialog::browseFilePrintTypeDialog() {
|
||||
*/
|
||||
void DiagramPrintDialog::print(const QList<Diagram *> &diagrams, bool fit_page, const ExportProperties options) {
|
||||
//qDebug() << "Demande d'impression de " << diagrams.count() << "schemas.";
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef QT_DEBUG
|
||||
qDebug() << "--";
|
||||
qDebug() << "DiagramPrintDialog::print printer_->resolution() before " << printer_->resolution();
|
||||
qDebug() << "DiagramPrintDialog::print screennumber " << QApplication::desktop()->screenNumber();
|
||||
#endif
|
||||
|
||||
QScreen *srn = QApplication::screens().at(QApplication::desktop()->screenNumber());
|
||||
qreal dotsPerInch = (qreal)srn->logicalDotsPerInch();
|
||||
printer_->setResolution(dotsPerInch);
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
qDebug() << "DiagramPrintDialog::print dotsPerInch " << dotsPerInch;
|
||||
qDebug() << "DiagramPrintDialog::print printer_->resolution() after" << printer_->resolution();
|
||||
qDebug() << "--";
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
// QPainter utiliser pour effectuer le rendu
|
||||
QPainter qp(printer_);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user