Created
May 21, 2012 23:33
-
-
Save k2052/2765393 to your computer and use it in GitHub Desktop.
Lua QT Bindings Example
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 'qtcore' | |
require 'qtgui' | |
app = QApplication.new(1, {'lua'}, 1) | |
btn = QPushButton.new("Hello World!") | |
btn:connect('2pressed()', function(self) | |
print("I'm about to close...") | |
self:close() | |
end) | |
btn:setWindowTitle("A great example!") | |
btn:resize(300,50) | |
btn:show() | |
app.exec() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment