Ver Mensaje Individual
  #7 (permalink)  
Antiguo 14/09/2012, 09:41
argotan
 
Fecha de Ingreso: septiembre-2012
Mensajes: 7
Antigüedad: 11 años, 7 meses
Puntos: 0
Respuesta: Cargar texto en qt

Código:
import sys
from PyQt4 import QtCore, QtGui
from ui import Ui_ventana

class principal (QtGui.QMainWindow):
	dato = 1
	def __init__(self):
		self.setupUI()
		self.connectUi()
		self.show()
		sys.exit(self.app.exec_())

	def setupUI(self):
		self.app=QtGui.QApplication(sys.argv)
		QtGui.QMainWindow.__init__(self)
		self.venta=Ui_ventana()
		self.venta.setupUi(self)
                
                self.dato_1 = self.dato
				
		self.venta.texto.setText(str(self.dato_1))
	
if __name__ == '__main__':
	principal()