QtRuby - Error

  • Thread starter German Alberto Gimenez Silva
  • Start date
G

German Alberto Gimenez Silva

Hello,
I new in the ruby world.
Sorry my english, i'm argentino and speak spanish.

My question is about QtRuby. Where can tutorials, Faq, Qt's Classes?.
Qt4 work with ruby or only Qt3?
I' design form with Qt4-designer and:

rbuic mainWindow.ui > mainWindow.rb

##################################################################
ggerman@comandante:~/Qt4/example$ cat mainWindow.rb
# Form implementation generated from reading ui file 'mainWindow.ui'
#
# Created: mar jul 17 08:28:32 2007
# by: The QtRuby User Interface Compiler (rbuic)
#
# WARNING! All changes made in this file will be lost!
require 'Qt'
class MainWindow < Qt::MainWindow
def initialize(parent =3D nil, name =3D nil, fl =3D WType_TopLevel)
super
statusBar()
setCentralWidget(Qt::Widget.new(self, "qt_central_widget"))
@Widget =3D Qt::Widget.new(centralWidget(), "Widget")
@MenuBar.setProperty( "geometry", Qt::Variant.new(Qt::Rect.new(0, 0=
,=20
409, 29) ) )
@StatusBar =3D Qt::StatusBar.new(centralWidget(), "StatusBar")
languageChange()
resize( Qt::Size.new(409, 580).expandedTo(minimumSizeHint()) )
clearWState( WState_Polished )
end
#
# Sets the strings of the subwidgets using the current
# language.
#
def languageChange()
setProperty("windowTitle", Qt::Variant.new(trUtf8("MainWindow")))
end
protected :languageChange
end
if $0 =3D=3D __FILE__
a =3D Qt::Application.new(ARGV)
w =3D MainWindow.new
a.mainWidget =3D w
w.show
a.exec
end
##################################################################

mainWindow.rb:24:in `initialize': undefined method `setProperty' for=20
nil:NilClass (NoMethodError)
from mainWindow.rb:47:in `new'
from mainWindow.rb:47

Thank you for you help.

=2D-=20
=2D---
"El mundo no est=C3=A1 en peligro por las malas personas sino por las buena=
s=20
personas que permiten la maldad." Albert Einstein.
=2D---
Star Wars: Episodio V - El imperio contraataca:
Ten cuidado de la ira, del miedo, de la agresividad. el Lado Oscuro ellos s=
on.=20
Una vez que entras en el sendero Oscuro dominar=C3=A1 tu destino para siemp=
re.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top