Build crossplatform applications with Qt and Ruby.
NB: Java must be installed on your system.
gem install thor
thor install http://qtjruby.org/qtjruby.thor
thor qtjruby:app:create myapp
cd myapp
java -jar lib/jruby-complete-$VERSION.jar main.rb
Download Qt Jambi for your platform. Put qtjambi-$VERSION.jar and qtjambi-$PLATFORM-$VERSION.jar into $JRUBY_HOME/lib folder. Then :
jruby -S gem install extlib
git clone git://github.com/nmerouze/qtjruby-core.git
cd /path/to/qtjruby-core
jruby -S rake install
jruby -S qtjruby example4.rb
Add -J-XstartOnFirstThread
option if you’re under Mac OS X.
Qt::Application.initialize(ARGV)
hello = Qt::PushButton.new 'Hello World!'
hello.show
Qt::Application.exec
Tested under:
- Mac OS X Tiger & Leopard
- Ubuntu 8.10 with Java 6 & OpenJDK
- Windows XP SP3
- Qt::JRuby : http://qtjruby.org & http://qtjruby.googlecode.com
- Qt::JRuby sources : http://github.com/nmerouze/qtjruby-core
- Qt Jambi Documentation : http://doc.trolltech.com
© 2008-2009 Nicolas Mérouze, under an MIT licence. http://www.opensource.org/licenses/mit-license.php
Please leave any bugs or feedback at nicolas.merouze [at] gmail [dot] com