Ruby bindings for Qt4
Submitted by zdk on Sun, 07/08/2007 - 15:57.
This is just another "Hello World" blog (not in-depth one) about well-known GUI library,so called "Qt".You probably take a look at Trolltech's [How to Learn Qt] tutorial.
[Keep in mind that like most documents about Qt, it is very C++ oriented.]
And I use Qt4 for this example.
This example shows how to create Ruby program with Ruby bindings for Qt4
The underlying code is where you are able to start
require 'Qt' app = Qt::Application.new(ARGV) window = Qt::Widget.new() hello = Qt::PushButton.new('Hello!,Qt'+Qt::qVersion,window) quit = Qt::PushButton.new('Quit', window) quit.setGeometry(10, 40, 80, 40) Qt::Object.connect(quit, SIGNAL('clicked()'), app, SLOT('quit()')) window.show() app.exec()
you will see something like this:

zdk's blog
• Login or register to post comments

