mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2024-11-05 05:26:55 +01:00
fix app.lua
This commit is contained in:
parent
a5a631c748
commit
b9f74eef60
2 changed files with 4 additions and 7 deletions
|
@ -46,7 +46,7 @@ function main()
|
||||||
layoutAddWidget(mainLayout, pushButton1)
|
layoutAddWidget(mainLayout, pushButton1)
|
||||||
connect(pushButton1, "clicked()", "showDialog")
|
connect(pushButton1, "clicked()", "showDialog")
|
||||||
|
|
||||||
setWidgetFixedSize(mainWindow)
|
setWidgetFixed(mainWindow)
|
||||||
showWidget(mainWindow, ShowNormal)
|
showWidget(mainWindow, ShowNormal)
|
||||||
return GuiExecuted
|
return GuiExecuted
|
||||||
end
|
end
|
||||||
|
@ -71,7 +71,7 @@ function showDialog(pushButton)
|
||||||
local dialogButton = createPushButton("Close", dialog)
|
local dialogButton = createPushButton("Close", dialog)
|
||||||
layoutAddWidget(buttonLayout, dialogButton)
|
layoutAddWidget(buttonLayout, dialogButton)
|
||||||
connect(dialogButton, "clicked()", "closeDialog")
|
connect(dialogButton, "clicked()", "closeDialog")
|
||||||
setWidgetFixedSize(dialog)
|
setWidgetFixed(dialog)
|
||||||
executeWidget(dialog)
|
executeWidget(dialog)
|
||||||
delete(dialog, DeleteInstant)
|
delete(dialog, DeleteInstant)
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
|
||||||
delete luaEngineStyleFile;
|
delete luaEngineStyleFile;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QFile luaScript(":/lua/edit.lua");
|
QFile luaScript(":/lua/app.lua");
|
||||||
|
|
||||||
LuaEngineGui luaEngineGui;
|
LuaEngineGui luaEngineGui;
|
||||||
luaEngineGui.executeLuaScript(&luaScript);
|
luaEngineGui.executeLuaScript(&luaScript);
|
||||||
|
@ -83,9 +83,6 @@ int main(int argc, char *argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return a.exec();
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue