Browse Source

dont use QtWebKit

its not available anymore in recent distributions:
https://lists.debian.org/debian-devel-announce/2015/05/msg00001.html

breaks the help feature, but ¯\_(ツ)_/¯
master_qgis2
Norwin 11 months ago
parent
commit
812e559af4
3 changed files with 10 additions and 9 deletions
  1. 1
    1
      core/actions.py
  2. 4
    4
      ui/main_window.py
  3. 5
    4
      ui/main_window_dialog.py

+ 1
- 1
core/actions.py View File

@@ -21,7 +21,7 @@
***************************************************************************/
"""

from PyQt4.QtWebKit import QWebView
#from PyQt4.QtWebKit import QWebView
from PyQt4.QtGui import QDesktopServices
from PyQt4.QtCore import QUrl
from qgis.utils import iface

+ 4
- 4
ui/main_window.py View File

@@ -191,9 +191,9 @@ class Ui_ui_main_window(object):
spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem2)
self.verticalLayout_5.addLayout(self.horizontalLayout_3)
self.webBrowser = QtWebKit.QWebView(self.scrollAreaWidgetContents)
self.webBrowser.setObjectName(_fromUtf8("webBrowser"))
self.verticalLayout_5.addWidget(self.webBrowser)
#self.webBrowser = QtWebKit.QWebView(self.scrollAreaWidgetContents)
#self.webBrowser.setObjectName(_fromUtf8("webBrowser"))
#self.verticalLayout_5.addWidget(self.webBrowser)
spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout_5.addItem(spacerItem3)
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
@@ -428,7 +428,7 @@ class Ui_ui_main_window(object):
self.groupBox_4.setTitle(_translate("ui_main_window", "Licence", None))

from qgis import gui
from PyQt4 import QtWebKit
#from PyQt4 import QtWebKit
from query_dialog import QueryWidget
from osm_file_dialog import OsmFileWidget
from quick_query_dialog import QuickQueryWidget

+ 5
- 4
ui/main_window_dialog.py View File

@@ -104,16 +104,17 @@ class MainWindowDialog(QDialog, Ui_ui_main_window):
file_help_path = join(doc_path, helpFileName)
if isfile(file_help_path):
self.help_file = file_help_path
self.webBrowser.load(QUrl(self.help_file))
#self.webBrowser.load(QUrl(self.help_file))
break
else:
self.webBrowser.setHtml("<h3>Help not available</h3>")
#else:
# self.webBrowser.setHtml("<h3>Help not available</h3>")

def get_root_help(self):
"""
home button set the default help page
"""
self.webBrowser.load(QUrl(self.help_file))
#self.webBrowser.load(QUrl(self.help_file))
pass

def refresh_my_queries_tree(self):
"""

Loading…
Cancel
Save