LCD number walking in Qtruby


Yes, I'm using E17

"All the people, so many people, they all go hand in hand, hand in hand through their parklife "
Blur - Parklife

Yes, I writed the LCD Number walking for the QtRuby, let see the code:
require 'Qt4'
class All < Qt::Widget
def initialize()
super()
setFixedSize(120, 250)
lcd = Qt::LCDNumber.new(2)
slider = Qt::Slider.new(Qt::Horizontal)
slider.setRange(0, 99)
slider.setValue(0)

connect(slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)'))
layout = Qt::VBoxLayout.new()
layout.addWidget(lcd)
layout.addWidget(slider)
setLayout(layout)
end
end

app = Qt::Application.new(ARGV)
widget = All.new()
widget.show()
app.exec()

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_())