-
Notifications
You must be signed in to change notification settings - Fork 4
/
usePyq4ToScreenshot2.py
55 lines (46 loc) · 1.98 KB
/
usePyq4ToScreenshot2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file ´E:wwwrootpythonDemoDemo.ui´
#
# Created: Sun Feb 19 09:05:26 2012
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
# from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1024, 768)
self.centralWidget = QtGui.QWidget(MainWindow)
self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.centralWidget)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.webView = QtWebKit.QWebView(self.centralWidget)
self.webSettings = self.webView.settings()
self.webSettings.setAttribute(QtWebKit.QWebSettings.PluginsEnabled,True)
self.webView.setUrl(QtCore.QUrl(_fromUtf8("http://xiaomizhou.net/")))
self.webView.setObjectName(_fromUtf8("webView"))
self.verticalLayout.addWidget(self.webView)
self.verticalLayout_2.addLayout(self.verticalLayout)
MainWindow.setCentralWidget(self.centralWidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", u"小米粥", None, QtGui.QApplication.UnicodeUTF8))
from PyQt4 import QtWebKit
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())