#!/usr/local/bin/ruby
=begin
/****************************************************************
**
** Qt tutorial 4
**
****************************************************************/
=end

require "qt2"
include Qt2

class MyWidget  < QWidget

def initialize ( parent=nil, name="" )
    super( parent, name )

    setMinimumSize( 200, 120 )
    setMaximumSize( 200, 120 )

    quit = QPushButton.new( "Quit", self, "quit" )
    quit.setGeometry( 62, 40, 75, 30 )
    quit.setFont( QFont.new( "Times", 18, QFont::Bold ) )

    connect( quit, QSIGNAL("clicked()"), QApplication::qApp, "quit" )
end
end

    a = QApplication.new( [$0] + ARGV )

    w = MyWidget.new
    w.setGeometry( 100, 100, 200, 120 )
    a.setMainWidget( w )
    w.show()
    a.exec()

