Merge branch 'master' into modular
[lqt.git] / test / t4.lua
bloba3710e447ff30bc989c69647eee8304250d11ed5
1 #!/usr/bin/lua
3 require'qtgui'
5 local new_MyWidget = function(...)
6 local this = QWidget.new(...)
7 local quit = QPushButton.new(QString.new'Quit', this)
8 this:setFixedSize(200, 120)
9 quit:setGeometry(62, 40, 75, 30)
10 quit:setFont(QFont.new(QString.new'Times', 18, 75))
11 QObject.connect(quit, '2clicked()', QCoreApplication.instance(), '1quit()')
12 return this
13 end
15 app = QApplication.new(1 + select('#', ...), {arg[0], ...})
16 app.__gc = app.delete -- take ownership of object
18 widget = new_MyWidget()
19 widget:show()
21 app.exec()