>>> 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)
>>> hello
hello
hello
hello
hello
hello
hello
hello
hello
button.clicked.disconnect(hello)
>>>
PyQt4 单击事件
使用PyQt4创建简单GUI应用
最新推荐文章于 2024-07-21 00:10:03 发布
1432

被折叠的 条评论
为什么被折叠?



