Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Graphical programming with Qt

3 views
Skip to first unread message

Amir Sanaii

unread,
May 30, 2010, 7:42:18 PM5/30/10
to
Hi every one
How are you my friends?

I will finally kill my self. :(

I want to write a graphical program with ruby and qt

but i can't.

I installed qtruby4(2.1.0) gem and qt-win-opensource-4.3.4-mingw (70.6
mb) and qtruby4installer (3mb) and qt-sdk-win-opensource-2010.02.1
(273mb) but there is
just errors.
I use ruby 1.8.6.

I configure the environment variables like this:

path c:\Qt\4.3.4\Bin;c:\MinGW\bin
QMAKESPEC win32-g++
QTDIR c:\Qt\4.3.4

and the

gcc -v
make -v
qmake -v

are work on my system.

I have MS windows XP on my machine.

I want to write my program in netbeans.
please help me how can i write this simple program in my
ide or every Ide else ?
i want programming with Qt in ruby please help me to get my goal :)
please advise me to download what and how installing them and what
should i do
and how configure the system to solve my problem??????
i read all thread in this site about qt but most of them are about
Linux OS and also I search the Web so much but I am so stupid and i
don't know
how can I write a Graphical program with Qt in ruby Lang.

thanks for your replies.


require 'Qt4'

app = Qt::Application.new(ARGV)

hello = Qt::PushButton.new('Hello World!')
hello.resize(100, 30)
hello.show()

app.exec()


when I run it say that :

from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from C:/Ruby/lib/ruby/site_ruby/1.8/Qt.rb:1
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from C:/Documents and Settings/Amir/qt2/lib/main.rb:3

it always get error on the firs line of program
(require 'Qt4')


I also test this version :

require 'Qt'
app = Qt::Application.new(ARGV)
button=Qt::PushButton.new("Hello Ruby, hello Qt!")
button.resize(100,30)
button.show
app.exec


I am going crazy.
.....
....
...
..
.

Damjan Rems

unread,
May 31, 2010, 3:23:44 AM5/31/10
to
I haven' tried qtruby > 2 but shouldn't require be just:

require 'Qt'


by
TheR

--
Posted via http://www.ruby-forum.com/.

Han Holl

unread,
May 31, 2010, 9:24:49 AM5/31/10
to
[Note: parts of this message were removed to make it a legal post.]

On Mon, May 31, 2010 at 1:42 AM, Amir Sanaii <amirs...@gmail.com> wrote:

>
> require 'Qt4'
>
> app = Qt::Application.new(ARGV)
>
> hello = Qt::PushButton.new('Hello World!')
> hello.resize(100, 30)
> hello.show()
>
> app.exec()
>
>

> Probably:

require 'rubygems'
require 'Qt4'

Cheers,

Han Holl

0 new messages