Skip to content
Permalink
Browse files

Use QPrinter instead of QPixmap to find out screen resolution

git-svn-id: http://svn.osgeo.org/qgis/trunk@8658 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jun 20, 2008
1 parent aff0f86 commit f609279f509756a65d7cf206dae730d6424ad718
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/qgsprojectfiletransform.cpp
@@ -22,7 +22,7 @@
#include "qgslogger.h"
#include <QTextStream>
#include <QDomDocument>
#include <QPixmap> //to find out screen resolution
#include <QPrinter> //to find out screen resolution

typedef QgsProjectVersion PFV;

@@ -242,8 +242,8 @@ void QgsProjectFileTransform::transform0100to0110()
if ( ! mDom.isNull() )
{
//Change 'outlinewidth' in QgsSymbol
QPixmap thePixmap;
int screenDpi = (thePixmap.logicalDpiX() + thePixmap.logicalDpiY()) / 2;
QPrinter myPrinter ( QPrinter::ScreenResolution );
int screenDpi = myPrinter.resolution();
double widthScaleFactor = 25.4 / screenDpi;

QDomNodeList outlineWidthList = mDom.elementsByTagName("outlinewidth");

0 comments on commit f609279

Please sign in to comment.
You can’t perform that action at this time.