Saturday, December 18, 2010

Installing Qt-Ruby

[Update] Currently I use qtbindings instead of Qt-Ruby. The main reason I switched is that Qt-Ruby is not in active development and has not support for Ruby 1.9.x. See "Installing qtbindings on Ubuntu" ( So the instruction below is no longer relevant for me.

1. Install Qt
Open Ubuntu Software Center from Application menu.
Find Qt Creator in Development/IDE group and install it.

2. Install Qt-Ruby
Open Synaptic Package Manager
Search for qt-ruby
Install libqt4-ruby

3. Test Qt-Ruby installation
$ irb
irb(main):001:0>require 'Qt4'
=> true

4. Write simple program.
# helloworld.rb
# based on tutorial on 
require 'Qt4'

app = ARGV
btn = 'Hello, World!'
btn.resize 100,30


5. Run it

6. Resouces

7. Notes.
There is no Qt-Ruby for Ruby 1.9.1 in the repositories.
Is there any, somewhere?

No comments:

Post a Comment