import sys
from PyQt4 import QtGui, QtCore
app = QtGui.QApplication(sys.argv)
widget = QtGui.QWidget()
widget.setGeometry(200, 100, 400, 300)
widget.setWindowTitle('PyQt Application')
show = QtGui.QCheckBox('Ayam Bakar',widget)
from PyQt4 import QtGui, QtCore
app = QtGui.QApplication(sys.argv)
widget = QtGui.QWidget()
widget.setGeometry(200, 100, 400, 300)
widget.setWindowTitle('PyQt Application')
show = QtGui.QCheckBox('Ayam Bakar',widget)
show.move(10, 10)
def hello():
if show.isChecked():
widget.setWindowTitle('Ayam Bakar')
else:
widget.setWindowTitle('')
widget.connect(show, QtCore.SIGNAL('stateChanged(int)'), hello)
widget.show()
sys.exit(app.exec_())
def hello():
if show.isChecked():
widget.setWindowTitle('Ayam Bakar')
else:
widget.setWindowTitle('')
widget.connect(show, QtCore.SIGNAL('stateChanged(int)'), hello)
widget.show()
sys.exit(app.exec_())
No comments:
Post a Comment