-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure map tips are not shown if QtWebKit is not installed (if tha…
…t's the case, disable the correspondant widget, showing a nice tooltip) (#82)
- Loading branch information
1 parent
585731f
commit d91a7f1
Showing
4 changed files
with
35 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
_WITH_QTWEBKIT = None | ||
|
||
|
||
def with_qt_web_kit() -> bool: | ||
global _WITH_QTWEBKIT | ||
if _WITH_QTWEBKIT is None: | ||
try: | ||
from PyQt5.QtWebKit import QWebSettings | ||
from PyQt5.QtWebKitWidgets import QWebView, QWebPage | ||
except ModuleNotFoundError: | ||
_WITH_QTWEBKIT = False | ||
else: | ||
_WITH_QTWEBKIT = True | ||
|
||
return _WITH_QTWEBKIT |