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 16
16
#ifndef QGSWEBVIEW_H
17
17
#define QGSWEBVIEW_H
18
18
19
+
19
20
#include < QWidget>
20
21
#include < QPrinter>
21
22
22
23
#ifdef WITH_QTWEBKIT
23
24
#include < QWebView>
25
+ #include < QDesktopWidget>
24
26
25
27
class CORE_EXPORT QgsWebView : public QWebView
26
28
{
@@ -29,7 +31,14 @@ class CORE_EXPORT QgsWebView : public QWebView
29
31
public:
30
32
explicit QgsWebView ( QWidget* parent = 0 )
31
33
: 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
+ }
33
42
};
34
43
#else
35
44
#include " qgswebpage.h"
Original file line number Diff line number Diff line change 22
22
#include < QLabel>
23
23
#include < QPushButton>
24
24
#include < QLineEdit>
25
- #include " qgswebview.h"
25
+
26
+ #ifdef WITH_QTWEBKIT
27
+ #include < QWebView>
28
+ #endif
29
+
26
30
27
31
/* *
28
32
* 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