close
- 下載Qt/Mac
- 下載QtRuby
- 安裝Qt:
./configure -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg -no-framework -fast -no-exceptions -no-stl -no-debug; make; sudo make install
- 安裝QtRuby:
./configure --enable-mac --with-qt-dir=/usr/local/Trolltech/Qt-4.2.3; make; sudo make install
-
cd /opt/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1; sudo mv qtruby4.so qtruby4.bundle
- 用irb測試:
require 'Qt' a = Qt::Application.new(ARGV) hello = Qt::PushButton.new('Hello World!', nil) hello.resize(150, 50) hello.show() a.exec()
全站熱搜