Wednesday, June 1, 2011

Installing qtbindings on Windows

Installed qtbindings on Windows Vista.
See also "Installing qtbindings on Ubuntu".


1. Requirements
Qt 4.6.x
cmake 2.6.3+
gcc 4.x
Ruby

2. Install
C:\works\ruby>gem list qt --remote

*** REMOTE GEMS ***

qtbindings (4.6.3.2 ruby x86-mingw32)
qtext (0.6.7)
qtjruby-core (0.3.0 java)
qtrefmovie (0.1.1)
qtruby4 (2.1.0 mswin32)

C:\works\ruby>gem install qtbindings
Successfully installed qtbindings-4.6.3.2-x86-mingw32
1 gem installed
Installing ri documentation for qtbindings-4.6.3.2-x86-mingw32...
Installing RDoc documentation for qtbindings-4.6.3.2-x86-mingw32...


3. Test Installation
C:\works\ruby>irb
irb(main):001:0> require 'qt'
=> true
irb(main):002:0> a = Qt::Application.new(ARGV)
=> #
irb(main):003:0> button = Qt::PushButton.new('Hello World!',nil)
=> #
irb(main):004:0> button.resize(300,30)
=> nil
irb(main):005:0> button.show()
=> nil
irb(main):006:0> a.exec()
=> true
irb(main):007:0>

4. Result








5. Resouces.
RubyGems.org: http://rubygems.org/gems/qtbindings
QtBindings Homepage: https://github.com/ryanmelt/qtbindings
Qt Homepage: http://qt.nokia.com/