Código generado por pyuic4


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # -*- coding: utf-8 -*-
  2.  
  3. # Form implementation generated from reading ui file 'calc.ui'
  4. #
  5. # Created: Mon Aug 10 00:45:52 2009
  6. # by: PyQt4 UI code generator 4.5.1
  7. #
  8. # WARNING! All changes made in this file will be lost!
  9.  
  10. from PyQt4 import QtCore, QtGui
  11.  
  12. class Ui_calc(object):
  13. def setupUi(self, calc):
  14. calc.setObjectName("calc")
  15. calc.resize(400, 180)
  16. self.label = QtGui.QLabel(calc)
  17. self.label.setGeometry(QtCore.QRect(20, 20, 80, 31))
  18. self.label.setObjectName("label")
  19. self.label_2 = QtGui.QLabel(calc)
  20. self.label_2.setGeometry(QtCore.QRect(20, 60, 80, 18))
  21. self.label_2.setObjectName("label_2")
  22. self.label_3 = QtGui.QLabel(calc)
  23. self.label_3.setGeometry(QtCore.QRect(20, 100, 70, 18))
  24. self.label_3.setObjectName("label_3")
  25. self.num1 = QtGui.QLineEdit(calc)
  26. self.num1.setGeometry(QtCore.QRect(100, 14, 113, 30))
  27. self.num1.setObjectName("num1")
  28. self.num2 = QtGui.QLineEdit(calc)
  29. self.num2.setGeometry(QtCore.QRect(100, 55, 113, 28))
  30. self.num2.setObjectName("num2")
  31. self.result = QtGui.QLineEdit(calc)
  32. self.result.setGeometry(QtCore.QRect(100, 96, 113, 28))
  33. self.result.setObjectName("result")
  34. self.sum = QtGui.QPushButton(calc)
  35. self.sum.setGeometry(QtCore.QRect(240, 10, 106, 27))
  36. self.sum.setObjectName("sum")
  37. self.res = QtGui.QPushButton(calc)
  38. self.res.setGeometry(QtCore.QRect(240, 40, 106, 27))
  39. self.res.setObjectName("res")
  40. self.mul = QtGui.QPushButton(calc)
  41. self.mul.setGeometry(QtCore.QRect(240, 70, 106, 27))
  42. self.mul.setObjectName("mul")
  43. self.div = QtGui.QPushButton(calc)
  44. self.div.setGeometry(QtCore.QRect(240, 100, 106, 27))
  45. self.div.setObjectName("div")
  46. self.salir = QtGui.QPushButton(calc)
  47. self.salir.setGeometry(QtCore.QRect(130, 140, 106, 27))
  48. self.salir.setObjectName("salir")
  49.  
  50. self.retranslateUi(calc)
  51. QtCore.QObject.connect(self.salir, QtCore.SIGNAL("clicked()"), calc.close)
  52. QtCore.QMetaObject.connectSlotsByName(calc)
  53.  
  54. def retranslateUi(self, calc):
  55. calc.setWindowTitle(QtGui.QApplication.translate("calc", "Calculadora", None, QtGui.QApplication.UnicodeUTF8))
  56. self.label.setText(QtGui.QApplication.translate("calc", "Número 1", None, QtGui.QApplication.UnicodeUTF8))
  57. self.label_2.setText(QtGui.QApplication.translate("calc", "Número 2", None, QtGui.QApplication.UnicodeUTF8))
  58. self.label_3.setText(QtGui.QApplication.translate("calc", "Resultado", None, QtGui.QApplication.UnicodeUTF8))
  59. self.sum.setText(QtGui.QApplication.translate("calc", "Sumar", None, QtGui.QApplication.UnicodeUTF8))
  60. self.res.setText(QtGui.QApplication.translate("calc", "Restar", None, QtGui.QApplication.UnicodeUTF8))
  61. self.mul.setText(QtGui.QApplication.translate("calc", "Multiplicar", None, QtGui.QApplication.UnicodeUTF8))
  62. self.div.setText(QtGui.QApplication.translate("calc", "Dividir", None, QtGui.QApplication.UnicodeUTF8))
  63. self.salir.setText(QtGui.QApplication.translate("calc", "Salir", None, QtGui.QApplication.UnicodeUTF8))

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.