Explicitely setPage to None in WebView's __del__.
This commit is contained in:
parent
d47f13e69b
commit
371c40f815
@ -121,6 +121,13 @@ class WebView(QWebView):
|
|||||||
url = self.url().toDisplayString()
|
url = self.url().toDisplayString()
|
||||||
return "WebView(url='{}')".format(elide(url, 50))
|
return "WebView(url='{}')".format(elide(url, 50))
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
# Explicitely releasing the page here seems to prevent some segfaults
|
||||||
|
# when quitting.
|
||||||
|
# Copied from:
|
||||||
|
# https://code.google.com/p/webscraping/source/browse/webkit.py#325
|
||||||
|
self.setPage(None)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def open_target(self):
|
def open_target(self):
|
||||||
"""Getter for open_target so we can define a setter."""
|
"""Getter for open_target so we can define a setter."""
|
||||||
|
Loading…
Reference in New Issue
Block a user