|
From: algodon c. <alg...@gm...> - 2009-04-02 14:23:01
|
Being a total beginner when it comes to design GUI, i gave up trying to use
pyfltk. I moved to pyqt which is certainly not more friendly but for which i
found much more examples.
Here is how i could add a shortcut to a checkbox and make it change the
window title.
self.cb = QtGui.QCheckBox('Motto', self)
self.cb.setFocusPolicy(QtCore.Qt.NoFocus)
self.cb.toggle();
self.cb.setShortcut('a')
self.connect(self.cb, QtCore.SIGNAL('stateChanged(int)'),
self.changeTitle)
def changeTitle(self, value):
if self.cb.isChecked():
self.setWindowTitle('Love is all...')
else:
self.setWindowTitle('we need !')
--
http://www.myspace.com/algodonciego
http://www.myspace.com/1h2f
|