1. Requirements Qt 4.6.xcmake 2.6.3+gcc 4.xRuby2. Install qtbindings.
$ gem install qtbindings2Building native extensions. This could take a while...3Successfully installed qtbindings-4.6.3.241 gem installed5Installing ri documentation for qtbindings-4.6.3.2...6Installing RDoc documentation for qtbindings-4.6.3.2...
3. Test.
01$ irb02ruby-1.9.2-p180 :001 > require 'Qt'03 => true04ruby-1.9.2-p180 :002 > a = Qt::Application.new(ARGV)05 => #<qt::application:0x88743dc objectname="irb">06ruby-1.9.2-p180 :003 > button = Qt::PushButton.new('Hello World!',nil)07 => #<qt::pushbutton:0x8a04db4 objectname="" ,="" x="0," y="0," width="640," height="480">08ruby-1.9.2-p180 :004 > button.resize(300,30)09 => nil10ruby-1.9.2-p180 :005 > button.show()11 => nil12ruby-1.9.2-p180 :006 > a.exec()13</qt::pushbutton:0x8a04db4></qt::application:0x88743dc>
5. Resouces.RubyGems.org: http://rubygems.org/gems/qtbindingsQtBindings Homepage: https://github.com/ryanmelt/qtbindingsQt Homepage: http://qt.nokia.com/,再回头,便生出无限羁绊。那是彼此的刺在对方心里留下的痕迹,