0
幾天前,我用wxpython想要訪問ie。但我不知道如何使用activex即與python。我的問題鏈接how use IEHtmlWindow widget change html form
所以我使用pyQt來開發GUI程序。
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(800, 600)
self.centralwidget = QtGui.QWidget(MainWindow)
self.webView = QtWebKit.QWebView(self.centralwidget)
self.webView.setGeometry(QtCore.QRect(110, 30, 571, 231))
self.webView.setUrl(QtCore.QUrl(_fromUtf8("about:blank")))
self.webView.setObjectName(_fromUtf8("webView"))
self.webView.load(QUrl('http://zzxh.zjsgat.gov.cn:6081/zjwwzzxh/'))
frame = self.webView.page().mainFrame()
print unicode(frame.toHtml()).encode('utf-8')
我運行前端代碼。但它也返回以下結果
<html><head></head><body></body></html>