File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1616#ifndef QGSWEBVIEW_H
1717#define QGSWEBVIEW_H
1818
19+
1920#include < QWidget>
2021#include < QPrinter>
2122
2223#ifdef WITH_QTWEBKIT
2324#include < QWebView>
25+ #include < QDesktopWidget>
2426
2527class CORE_EXPORT QgsWebView : public QWebView
2628{
@@ -29,7 +31,14 @@ class CORE_EXPORT QgsWebView : public QWebView
2931 public:
3032 explicit QgsWebView ( QWidget* parent = 0 )
3133 : QWebView( parent )
32- {}
34+ {
35+ QDesktopWidget desktop;
36+ // Apply zoom factor for HiDPI screens
37+ if ( desktop.physicalDpiX ( ) > 96 )
38+ {
39+ setZoomFactor ( desktop.physicalDpiX ( ) / 96 );
40+ }
41+ }
3342};
3443#else
3544#include " qgswebpage.h"
Original file line number Diff line number Diff line change 2222#include < QLabel>
2323#include < QPushButton>
2424#include < QLineEdit>
25- #include " qgswebview.h"
25+
26+ #ifdef WITH_QTWEBKIT
27+ #include < QWebView>
28+ #endif
29+
2630
2731/* *
2832 * Wraps a photo widget. Will show a picture and a file chooser to change the picture.
You can’t perform that action at this time.
0 commit comments