6 local new_MyWidget
= function(...)
7 local this
= QWidget
.new(...)
8 local quit
= QPushButton
.new(QString
.new
'Quit', this
)
9 this
:setFixedSize(200, 120)
10 quit
:setGeometry(62, 40, 75, 30)
11 quit
:setFont(QFont
.new(QString
.new
'Times', 18, 75))
12 QObject
.connect(quit
, '2clicked()', QCoreApplication
.instance(), '1quit()')
16 app
= QApplication
.new(1 + select('#', ...), {arg
[0], ...})
17 app
.__gc
= app
.delete
-- take ownership of object
19 widget
= new_MyWidget()