Languages/Ruby

From KDE TechBase
Revision as of 19:48, 7 May 2008 by Mark Ziegler (talk | contribs) (First part of migration from developer.kde.org)

Very complete bindings to both the KDE API and the Qt APIs. The Korundum package includes both a QtRuby Qt-only binding along with the full combined Qt/KDE one. The QtRuby package contains just Qt bindings with no dependencies on KDE.

Korundum/QtRuby - Ruby-KDE/Qt bindings

NEW - The book Rapid GUI Development with QtRuby is now available.

Being Smoke-based bindings means that they offer full access to most KDE 3.x and Qt 3.x classes.


QtRuby

Hello world example:

  1. !/usr/bin/ruby -w

require 'Qt' a = Qt::Application.new(ARGV) hello = Qt::PushButton.new("Hello World!", nil) hello.resize(100, 30) a.mainWidget = hello hello.show() a.exec()


Current api coverage overview

Available calls

You can call all Qt public and protected methods, and all friend methods such as bitBlt() etc

Virtual methods

All virtual methods can be overridden, not just event handlers

Properties

'foobar = 5' is a synonym for 'setFooBar(5)'

t.b.c. (http://developer.kde.org/language-bindings/ruby/index.html)

A series of articles on ruby QT (inspired by the work done for the dradis project):