QtRuby

Introduction

QtRuby is a binding that allows you to construct Qt applications using the Ruby programming language. After using Qt for some projects, I started playing with QtRuby to build more flexible applications in a shorter timespan.

Unfortunately, there is not a whole lot of up-to-date information available. The most useful resource is a document containing technical information about the binding, but it is surely daunting for beginners. There is also a book named Rapid GUI Development with QtRuby, published by The Pragmatic Bookshelf that is focused on an older version of Qt.

I was amazed about how quickly an application can be developed in QtRuby, once you know how things work. To help you diving in, I decided to start writing down notes, with the hope that it will be useful to others.

Your first Qt application

#!/usr/bin/env ruby

require 'Qt4'

app = Qt::Application.new(ARGV)
app.exec