Python - ayuda monkey studio

 
Vista:

ayuda monkey studio

Publicado por yeni (4 intervenciones) el 06/10/2011 03:37:53
soy nuevo en python
y toy utilizando monkey studio

la cosa k toy haciendo mi tipico hola mundo
y cuando doy click en el botonno funciona nada

ksisiera saber cual es mi error

ahi i codigo
y perdonen la ignorancia

///////////////////////////////////////////////////////////////////////////////////////

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
import sys
 
# import PyQt4 QtCore and QtGui modules
from PyQt4.QtCore import *
from PyQt4.QtGui import *
 
from mainwindow import MainWindow
 
if __name__ == '__main__':
    # create applicationfrom PyQt4.QtCore import *
from PyQt4 import uic
(Ui_MainWindow, QMainWindow) = uic.loadUiType('mainwindow.ui')
 
class MainWindow (QMainWindow):
	"""MainWindow inherits QMainWindow"""
 
	def __init__ (self, parent = None):
		QMainWindow.__init__(self, parent)
		self.ui = Ui_MainWindow()
		self.ui.setupUi(self)
		self.connect(self.ui.pushButton,SIGNAL('clicked()'),SLOT('click()'))
 
	def __del__ (self):
		self.ui = None
 
	def click(self):
		messagebox('hola')
 
 
 
    app = QApplication(sys.argv)
    app.setApplicationName('My PyQt4 QtGui Project')
 
    # create widget
    w = MainWindow()
    w.setWindowTitle('My PyQt4 QtGui Project')
    w.show()
 
    # connection
    QObject.connect(app, SIGNAL('lastWindowClosed()'), app, SLOT('quit()'))
 
 
    # execute application
    sys.exit(app.exec_())


///////////////////////////////
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder