<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.8.1">
</HEAD>
<BODY>
Hello list;<BR>
<BR>
I've been lurking for quite some time but I finally have something to say. I have a section in my upcoming book on using QtRuby for RAD. The book is a 'quick reference/pocket reference' style of book called Ruby Phrasebook (it's up on Amazon.com). Anyway, it covers Qt4 since that's the first release that's GPL for all platforms. Below I have a "Hello World" example that I wanted to run by you guys: see any major problems with my approach WRT Qt4? There's no documentation out there, yet ...<BR>
<BR>
<PRE>
require 'Qt'
app = Qt::Application.new ARGV
class MyDialog < Qt::Widget
slots 'button_clicked()'
def initialize(parent=nil)
super(parent)
@vgroup = Qt::VBoxLayout.new
@button = Qt::PushButton.new "Hello World!"
@edit = Qt::LineEdit.new "Hello?"
@vgroup.addWidget @button
@vgroup.addWidget @edit
connect @button, SIGNAL('clicked()'), self,
SLOT('button_clicked()')
self.setLayout @vgroup
end
def button_clicked()
@edit.text = 'Hello! Hello!'
end
end
window = MyDialog.new
window.show
app.exec
</PRE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Jason D. Clinton <<A HREF="mailto:me@jasonclinton.com">me@jasonclinton.com</A>>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>