Example:
from PyQt4 import QtGui
# create a button
btn = QtGui.QPushButton('Button')
# create button click function
def clickFunc():
print 'This is a button!'
# create signal for the button
# when click the button, excute the click function
btn.clicked.connect(clickFunc)
# show the button ui
btn.show()
No comments:
Post a Comment