/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'calc.ui' # # Created: Mon Aug 10 00:45:52 2009 # by: PyQt4 UI code generator 4.5.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_calc(object): def setupUi(self, calc): calc.setObjectName("calc") calc.resize(400, 180) self.label = QtGui.QLabel(calc) self.label.setGeometry(QtCore.QRect(20, 20, 80, 31)) self.label.setObjectName("label") self.label_2 = QtGui.QLabel(calc) self.label_2.setGeometry(QtCore.QRect(20, 60, 80, 18)) self.label_2.setObjectName("label_2") self.label_3 = QtGui.QLabel(calc) self.label_3.setGeometry(QtCore.QRect(20, 100, 70, 18)) self.label_3.setObjectName("label_3") self.num1 = QtGui.QLineEdit(calc) self.num1.setGeometry(QtCore.QRect(100, 14, 113, 30)) self.num1.setObjectName("num1") self.num2 = QtGui.QLineEdit(calc) self.num2.setGeometry(QtCore.QRect(100, 55, 113, 28)) self.num2.setObjectName("num2") self.result = QtGui.QLineEdit(calc) self.result.setGeometry(QtCore.QRect(100, 96, 113, 28)) self.result.setObjectName("result") self.sum = QtGui.QPushButton(calc) self.sum.setGeometry(QtCore.QRect(240, 10, 106, 27)) self.sum.setObjectName("sum") self.res = QtGui.QPushButton(calc) self.res.setGeometry(QtCore.QRect(240, 40, 106, 27)) self.res.setObjectName("res") self.mul = QtGui.QPushButton(calc) self.mul.setGeometry(QtCore.QRect(240, 70, 106, 27)) self.mul.setObjectName("mul") self.div = QtGui.QPushButton(calc) self.div.setGeometry(QtCore.QRect(240, 100, 106, 27)) self.div.setObjectName("div") self.salir = QtGui.QPushButton(calc) self.salir.setGeometry(QtCore.QRect(130, 140, 106, 27)) self.salir.setObjectName("salir") self.retranslateUi(calc) QtCore.QObject.connect(self.salir, QtCore.SIGNAL("clicked()"), calc.close) QtCore.QMetaObject.connectSlotsByName(calc) def retranslateUi(self, calc): calc.setWindowTitle(QtGui.QApplication.translate("calc", "Calculadora", None, QtGui.QApplication.UnicodeUTF8)) self.label.setText(QtGui.QApplication.translate("calc", "Número 1", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setText(QtGui.QApplication.translate("calc", "Número 2", None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("calc", "Resultado", None, QtGui.QApplication.UnicodeUTF8)) self.sum.setText(QtGui.QApplication.translate("calc", "Sumar", None, QtGui.QApplication.UnicodeUTF8)) self.res.setText(QtGui.QApplication.translate("calc", "Restar", None, QtGui.QApplication.UnicodeUTF8)) self.mul.setText(QtGui.QApplication.translate("calc", "Multiplicar", None, QtGui.QApplication.UnicodeUTF8)) self.div.setText(QtGui.QApplication.translate("calc", "Dividir", None, QtGui.QApplication.UnicodeUTF8)) self.salir.setText(QtGui.QApplication.translate("calc", "Salir", None, QtGui.QApplication.UnicodeUTF8))