Created
September 28, 2011 22:50
-
-
Save codebycliff/136be45b1c8691561d15 to your computer and use it in GitHub Desktop.
Simple Qt application written the Ruby way...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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