# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'test.ui'
#
# Created: Sat Jan 26 21:56:01 2013
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8
= QtCore.
QString.
fromUtf8except AttributeError:
_fromUtf8 = lambda s: s
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
Form.resize(247, 177)
self.
label = QtGui.
QLabel(Form
) self.
label.
setGeometry(QtCore.
QRect(60,
40,
131,
20)) self.label.setObjectName(_fromUtf8("label"))
self.
button.
setGeometry(QtCore.
QRect(70,
100,
96,
27)) self.button.setObjectName(_fromUtf8("button"))
self.retranslateUi(Form)
def retranslateUi(self, Form):
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'test.ui'
#
# Created: Sat Jan 26 21:56:01 2013
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
Form.resize(247, 177)
self.label = QtGui.QLabel(Form)
self.label.setGeometry(QtCore.QRect(60, 40, 131, 20))
self.label.setObjectName(_fromUtf8("label"))
self.button = QtGui.QPushButton(Form)
self.button.setGeometry(QtCore.QRect(70, 100, 96, 27))
self.button.setObjectName(_fromUtf8("button"))
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("Form", "Hmmm...", None, QtGui.QApplication.UnicodeUTF8))
self.button.setText(QtGui.QApplication.translate("Form", "Press Me!", None, QtGui.QApplication.UnicodeUTF8))
To copy to clipboard, switch view to plain text mode
import sys
from PyQt4 import QtCore, QtGui
import ui_test
def clicked():
designed.label.setText("Hello World!")
def main():
designed = ui_test.Ui_Form()
designed.setupUi(widget)
designed.button.clicked.connect(clicked)
widget.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
import sys
from PyQt4 import QtCore, QtGui
import ui_test
def clicked():
designed.label.setText("Hello World!")
def main():
app = QtGui.QApplication(sys.argv)
designed = ui_test.Ui_Form()
widget = QtGui.QWidget()
designed.setupUi(widget)
designed.button.clicked.connect(clicked)
widget.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
To copy to clipboard, switch view to plain text mode
designed.label.setText("Hello World!")
designed.label.setText("Hello World!")
To copy to clipboard, switch view to plain text mode
Bookmarks