[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] One slot called two times
From: Carles Pina i Estany <carles () pina ! cat>
Date: 2006-10-21 19:21:37
Message-ID: 20061021192137.GA9051 () pinux ! info
[Download RAW message or body]
Hello,
I was used to connect signals and slots using "connect". Now I am
updating myself to Qt4 and using "autoconnect" feature.
I have the simplest code that I can do and the slot is called two times.
The code is:
-------------------
#!/usr/bin/python
import sys
from PyQt4 import QtCore, QtGui
from ppal import *
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QDialog.__init__(self)
self.ui = Ui_Form()
self.ui.setupUi(self)
def on_pushButton_clicked(self):
print "pushbuttoncliecked slot"
if int(str(self.ui.age.text()))>=18:
self.ui.answer.setText("Adult");
else:
self.ui.answer.setText("not adult");
if __name__ == "__main__":
app=QtGui.QApplication(sys.argv)
window=MainWindow()
window.show()
sys.exit(app.exec_())
-------------------
I press one time and pushbutton_clicked slot is called two times.
I am using Debian with this packages:
ii pyqt4-dev-tools 4.0.1-3 Development tools for PyQt4
ii python-qt4-dev 4.0.1-3 Development files for PyQt4
I have searched on mailing list but I haven't found (I think that is my blame
:-) )
Thanks!
--
Carles Pina i Estany GPG id: 0x8CBDAE64
http://pinux.info Manresa - Barcelona
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic