repo.or.cz
/
lqt
/
mk.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Changed default memory management model
[lqt/mk.git]
/
test
/
t1.lua
blob
fa3b4dd91e7e6ea12ad00d99a39298e69cb6dcd6
1
#!/
usr
/
bin
/
lua
2
3
require
'qtcore'
4
require
'qtgui'
5
6
app
=
QApplication
(
1
+
select
(
'#'
, ...), {
arg
[
0
], ...})
7
8
-- the conversion from Lua string to QString is automatic
9
hello
=
QPushButton
.
new
(
"Hello World!"
)
10
-- but not the other way round
11
print
(
hello
:
text
():
toUtf8
())
12
13
hello
:
resize
(
100
,
30
)
14
hello
:
show
()
15
16
app
.
exec
()
17
18