I'm developing a GUI program in python which is essentially just a webpage within a QT
dialog. I was wondering whether it was possible to remove the title bar because it looks horrible. So far, I have this:
app = QtGui.QApplication([])
view = QtWebKit.QWebView()
class MyWebPage(QtWebKit.QWebPage):
def acceptNavigationRequest(self, frame, req, nav_type):
if nav_type == QtWebKit.QWebPage.NavigationTypeFormSubmitted:
text = "<br/>\n".join(["%s: %s" % pair for pair in req.url().queryItems()])
view.setHtml(text)
return False
else:
return super(MyWebPage, self).acceptNavigationRequest(frame, req, nav_type)
view.setPage(MyWebPage())
html = """
<h1>Hello World!</h1>
"""
view.setHtml(html)
view.show()
app.exec_()
I tried the instructions Here, but it's returning the error "error: widget not definied
"
Thanks.