Skip to content

Instantly share code, notes, and snippets.

@codebycliff
Created September 28, 2011 22:50
Show Gist options
  • Save codebycliff/136be45b1c8691561d15 to your computer and use it in GitHub Desktop.
Save codebycliff/136be45b1c8691561d15 to your computer and use it in GitHub Desktop.
Simple Qt application written the Ruby way...
require 'Qt4'
app = QApplication.new([]) do
window = QMainWindow.new do
button = QPushButton.new("Quit") do
connect(self, :clicked) { qApp.quit }
end
set_central_widget(button)
set_window_title("Qt Application - The Ruby Way")
resize(300,200)
show
end
exec
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment