LCD Number walking in PyQt

It's just this:



Yes, I'm using the Window Maker and I'm loving it


Now the code:

#!/usr/bin/python
import sys
from PyQt4 import QtGui, QtCore

class SigSlot(QtGui.QWidget):
def __init__(self):
QtGui.QWidget.__init__(self)
self.setWindowTitle('Number')
lcd = QtGui.QLCDNumber(self)
slider = QtGui.QSlider(QtCore.Qt.Horizontal, self)
vbox = QtGui.QVBoxLayout()
vbox.addWidget(lcd)
vbox.addWidget(slider)
self.setLayout(vbox)
self.connect(slider, QtCore.SIGNAL('valueChanged(int)'), lcd, QtCore.SLOT('display(int)'))
self.resize(250, 150)

app = QtGui.QApplication(sys.argv)
qb = SigSlot()
qb.show()
sys.exit(app.exec_())

1 comentários:

Sergio disse...

Bom mesmo é ver o velho windowmaker no seu post!