fix app.lua

This commit is contained in:
Syping 2018-08-31 05:52:59 +02:00
parent a5a631c748
commit b9f74eef60
2 changed files with 4 additions and 7 deletions

View file

@ -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

View file

@ -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 1;
} }
return a.exec();
}