凝望长空 发表于 2011-12-29 17:30

[转载 ]Installing qtbindings (alt Qt-Ruby) on Ubuntu

[转载 ]Installing qtbindings (alt Qt-Ruby) on Ubuntu







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

2. Install qtbindings.

Bash代码
1.$ gem install qtbindings   
2.2
3.Building native extensions.This could take a while...   
4.3
5.Successfully installed qtbindings-4.6.3.2
6.4
7.1 gem installed   
8.5
9.Installing ri documentation for qtbindings-4.6.3.2...   
10.6
11.Installing RDoc documentation for qtbindings-4.6.3.2...
$ gem install qtbindings
2
Building native extensions.This could take a while...
3
Successfully installed qtbindings-4.6.3.2
4
1 gem installed
5
Installing ri documentation for qtbindings-4.6.3.2...
6
Installing RDoc documentation for qtbindings-4.6.3.2...3. Test.

Ruby代码1.01   
2.$ irb   
3.02   
4.ruby-1.9.2-p180 :001 > require 'Qt'
5.03   
6. => true
7.04   
8.ruby-1.9.2-p180 :002 > a = Qt::Application.new(ARGV)   
9.05   
10. => #<qt::application:0x88743dc objectname="irb">   
11.06   
12.ruby-1.9.2-p180 :003 > button = Qt::PushButton.new('Hello World!',nil)   
13.07   
14. => #<qt::pushbutton:0x8a04db4 objectname="" ,="" x="0," y="0," width="640," height="480">   
15.08   
16.ruby-1.9.2-p180 :004 > button.resize(300,30)   
17.09   
18. => nil
19.10   
20.ruby-1.9.2-p180 :005 > button.show()   
21.11   
22. => nil
23.12   
24.ruby-1.9.2-p180 :006 > a.exec()   
25.13   
26.</qt::pushbutton:0x8a04db4></qt::application:0x88743dc>
01
$ irb
02
ruby-1.9.2-p180 :001 > require 'Qt'
03
=> true
04
ruby-1.9.2-p180 :002 > a = Qt::Application.new(ARGV)
05
=> #<qt::application:0x88743dc objectname="irb">
06
ruby-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">
08
ruby-1.9.2-p180 :004 > button.resize(300,30)
09
=> nil
10
ruby-1.9.2-p180 :005 > button.show()
11
=> nil
12
ruby-1.9.2-p180 :006 > a.exec()
13
</qt::pushbutton:0x8a04db4></qt::application:0x88743dc>5. Resouces.
RubyGems.org: http://rubygems.org/gems/qtbindings
QtBindings Homepage: https://github.com/ryanmelt/qtbindings
Qt Homepage: http://qt.nokia.com/

小鬼萌萌控 发表于 2011-12-29 17:30

谢谢分享
页: [1]
查看完整版本: [转载 ]Installing qtbindings (alt Qt-Ruby) on Ubuntu