Sha256: b7173810b3dd5d6d30af20862f16bcb933e6efd5de78aa584d05ce51cc6d0cd1

Contents?: true

Size: 468 Bytes

Versions: 7

Compression:

Stored size: 468 Bytes

Contents

#!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0)

require 'Qt'

class MyWidget < Qt::Widget
  def initialize(parent = nil)
    super
    setFixedSize(200, 120)

    quit = Qt::PushButton.new('Quit', self)
    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

app = Qt::Application.new(ARGV)

widget = MyWidget.new
widget.show
app.exec

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rock-qtbindings-4.8.6.5 examples/tutorial/t4/t4.rb
qtbindings-4.8.6.5 examples/tutorial/t4/t4.rb
qtbindings-4.8.6.5-x86-mingw32 examples/tutorial/t4/t4.rb
qtbindings-4.8.6.5-x64-mingw32 examples/tutorial/t4/t4.rb
qtbindings-4.8.6.4-x86-mingw32 examples/tutorial/t4/t4.rb
qtbindings-4.8.6.4-x64-mingw32 examples/tutorial/t4/t4.rb
qtbindings-4.8.6.4 examples/tutorial/t4/t4.rb