$BE7Ln(B $BN5B@O:(B
Hi, I am Ryutaro Amano.
I am using ruby-1.8.4 on Mac 10.4.4 with XCode-2.2
I have installed qtruby-1.0.10
the following steps
after archiving qt-mac-free-3.3.6-snapshot-20060127.tar.bz2, mv /
Developer/qt
export QTDIR=/Developer/qt
export PATH=$QTDIR/bin:$PATH
export MANPATH=$QTDIR/doc/man:$MANPATH
export DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH
cd /Developer/qt/
/configure -thread
make
sudo ln -sf $QTDIR/lib/libqt.3.dylib /usr/lib
sudo ln -sf $QTDIR/lib/libqui.1.dylib /usr/lib
after archiving qtruby-1.0.10
cd qtruby-1.0.10
/configure --enable-mac --with-qt-dir=/Developer/qt --with-qt-
includes=/Developer/qt/include --with-qt-libraries=/Developer/qt/lib
cd smoke/qt
perl generate.pl
qmake -makefile
sudo make
cd../..
cd qtruby/rubylib/qtruby
ruby extconf.rb --with-qt-dir=/Developer/qt --with-smoke-dir=/usr --
with-smoke-include=../../../smoke
make
sudo make install
cd ../..
cd qtruby/rubylib/designer/rbuic
qmake -makefile
sudo make
cd ../..
cd qtruby/rubylib/designer/uilib
ruby extconf.rb --with-qtruby-include=../../qtruby --with-qt-dir=/
Developer/qt
make
sudo make install
I have verified the installation
irb > require "Qt"
dyld:NSLinkModule()error
dyld:Librarynotloaded:libqt-mt.3.dylib
Referencedfrom:/usr/lib/ruby/.../qtruby.bundle
Reason:imagenotfound
Trace/BPTtrap
I did
sudo ln -sf /Developer/qt/lib/libqt-mt.3.dylib /usr/lib
irb > require "Qt"
=>true
OK !!
I tried "qtruby-1.0.10/qtruby/rubylib/tutorial/t1/t1.rb"
----------------------------------------------
#!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt'
a = Qt::Application.new(ARGV)
hello = Qt:ushButton.new('Hello World!', nil)
hello.resize(100, 30)
a.setMainWidget(hello)
hello.show()
a.exec()
--------------------------------------------
ruby /Users/emergency_mini/QtRuby/qtruby-1.0.10/qtruby/rubylib/
tutorial/t1/t1.rb
the window appears background of Terminal and the windows is
disabled, gray color.
the close button, the minimum button, the maximum button work.
But the color of the window is gray, the color of disabled state.
Why?
tutorial/t2/t2.rb and tutorial/t3/t3.rb are the same result.
"Quit" button works
-----------------------------------t2-----------------------------
#!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt';
a = Qt::Application.new(ARGV)
quit = Qt:ushButton.new('Quit', nil)
quit.resize(75, 30)
quit.setFont(Qt::Font.new('Times', 18, Qt::Font::Bold))
Qt::Object.connect(quit, SIGNAL('clicked()'), a, SLOT('quit()'))
a.setMainWidget(quit)
quit.show
a.exec
exit
-----------------------------------------------------------------------
The window of tutorial4 have not button.
---------------------------------------------------------------------
#!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt'
class MyWidget < Qt::Widget
def initialize(parent = nil, name = nil)
super
setMinimumSize(200, 120)
setMaximumSize(200, 120)
quit = Qt:ushButton.new('Quit', self, 'quit')
quit.setGeometry(62, 40, 75, 30)
quit.setFont(Qt::Font.new('Times', 18, Qt::Font::Bold))
connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()'))
end
end
a = Qt::Application.new(ARGV)
w = MyWidget.new
w.setGeometry(100, 100, 200, 120)
a.setMainWidget(w)
w.show
a.exec
I am using ruby-1.8.4 on Mac 10.4.4 with XCode-2.2
I have installed qtruby-1.0.10
the following steps
after archiving qt-mac-free-3.3.6-snapshot-20060127.tar.bz2, mv /
Developer/qt
export QTDIR=/Developer/qt
export PATH=$QTDIR/bin:$PATH
export MANPATH=$QTDIR/doc/man:$MANPATH
export DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH
cd /Developer/qt/
/configure -thread
make
sudo ln -sf $QTDIR/lib/libqt.3.dylib /usr/lib
sudo ln -sf $QTDIR/lib/libqui.1.dylib /usr/lib
after archiving qtruby-1.0.10
cd qtruby-1.0.10
/configure --enable-mac --with-qt-dir=/Developer/qt --with-qt-
includes=/Developer/qt/include --with-qt-libraries=/Developer/qt/lib
cd smoke/qt
perl generate.pl
qmake -makefile
sudo make
cd../..
cd qtruby/rubylib/qtruby
ruby extconf.rb --with-qt-dir=/Developer/qt --with-smoke-dir=/usr --
with-smoke-include=../../../smoke
make
sudo make install
cd ../..
cd qtruby/rubylib/designer/rbuic
qmake -makefile
sudo make
cd ../..
cd qtruby/rubylib/designer/uilib
ruby extconf.rb --with-qtruby-include=../../qtruby --with-qt-dir=/
Developer/qt
make
sudo make install
I have verified the installation
irb > require "Qt"
dyld:NSLinkModule()error
dyld:Librarynotloaded:libqt-mt.3.dylib
Referencedfrom:/usr/lib/ruby/.../qtruby.bundle
Reason:imagenotfound
Trace/BPTtrap
I did
sudo ln -sf /Developer/qt/lib/libqt-mt.3.dylib /usr/lib
irb > require "Qt"
=>true
OK !!
I tried "qtruby-1.0.10/qtruby/rubylib/tutorial/t1/t1.rb"
----------------------------------------------
#!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt'
a = Qt::Application.new(ARGV)
hello = Qt:ushButton.new('Hello World!', nil)
hello.resize(100, 30)
a.setMainWidget(hello)
hello.show()
a.exec()
--------------------------------------------
ruby /Users/emergency_mini/QtRuby/qtruby-1.0.10/qtruby/rubylib/
tutorial/t1/t1.rb
the window appears background of Terminal and the windows is
disabled, gray color.
the close button, the minimum button, the maximum button work.
But the color of the window is gray, the color of disabled state.
Why?
tutorial/t2/t2.rb and tutorial/t3/t3.rb are the same result.
"Quit" button works
-----------------------------------t2-----------------------------
#!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt';
a = Qt::Application.new(ARGV)
quit = Qt:ushButton.new('Quit', nil)
quit.resize(75, 30)
quit.setFont(Qt::Font.new('Times', 18, Qt::Font::Bold))
Qt::Object.connect(quit, SIGNAL('clicked()'), a, SLOT('quit()'))
a.setMainWidget(quit)
quit.show
a.exec
exit
-----------------------------------------------------------------------
The window of tutorial4 have not button.
---------------------------------------------------------------------
#!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt'
class MyWidget < Qt::Widget
def initialize(parent = nil, name = nil)
super
setMinimumSize(200, 120)
setMaximumSize(200, 120)
quit = Qt:ushButton.new('Quit', self, 'quit')
quit.setGeometry(62, 40, 75, 30)
quit.setFont(Qt::Font.new('Times', 18, Qt::Font::Bold))
connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()'))
end
end
a = Qt::Application.new(ARGV)
w = MyWidget.new
w.setGeometry(100, 100, 200, 120)
a.setMainWidget(w)
w.show
a.exec