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()')
15 app
= QApplication
.new(1 + select('#', ...), {arg
[0], ...})
16 app
.__gc
= app
.delete
-- take ownership of object
18 widget
= new_MyWidget()