PyQt4 单击事件

来源:互联网 发布:淘宝查假货 编辑:程序博客网 时间:2024/05/20 12:48
>>> from PyQt4 import QtGui>>> import sys>>> app = QtGui.QApplication(sys.argv)>>> button = QtGui.QPushButton("Click me")>>> button.move(QtGui.QCursor.pos())>>> button.show()>>> button.raise_()>>> def hello():...     print "hello"...>>> hello()hello>>> button.clicked.connect(hello)>>> hellohellohellohellohellohellohellohellohellobutton.clicked.disconnect(hello)>>>
0 0