Skip to content

Instantly share code, notes, and snippets.

@k2052
Created May 21, 2012 23:33
Show Gist options
  • Save k2052/2765393 to your computer and use it in GitHub Desktop.
Save k2052/2765393 to your computer and use it in GitHub Desktop.
Lua QT Bindings Example
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