From b9f74eef60c982465398739ef8f442be2ea75490 Mon Sep 17 00:00:00 2001 From: Syping Date: Fri, 31 Aug 2018 05:52:59 +0200 Subject: [PATCH] fix app.lua --- src/luaengineapp/app.lua | 4 ++-- src/luaengineapp/main.cpp | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/luaengineapp/app.lua b/src/luaengineapp/app.lua index 3a17cf1..5dc35ce 100644 --- a/src/luaengineapp/app.lua +++ b/src/luaengineapp/app.lua @@ -46,7 +46,7 @@ function main() layoutAddWidget(mainLayout, pushButton1) connect(pushButton1, "clicked()", "showDialog") - setWidgetFixedSize(mainWindow) + setWidgetFixed(mainWindow) showWidget(mainWindow, ShowNormal) return GuiExecuted end @@ -71,7 +71,7 @@ function showDialog(pushButton) local dialogButton = createPushButton("Close", dialog) layoutAddWidget(buttonLayout, dialogButton) connect(dialogButton, "clicked()", "closeDialog") - setWidgetFixedSize(dialog) + setWidgetFixed(dialog) executeWidget(dialog) delete(dialog, DeleteInstant) end diff --git a/src/luaengineapp/main.cpp b/src/luaengineapp/main.cpp index 8acd3c5..06ae604 100644 --- a/src/luaengineapp/main.cpp +++ b/src/luaengineapp/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) delete luaEngineStyleFile; #endif - QFile luaScript(":/lua/edit.lua"); + QFile luaScript(":/lua/app.lua"); LuaEngineGui luaEngineGui; luaEngineGui.executeLuaScript(&luaScript); @@ -83,9 +83,6 @@ int main(int argc, char *argv[]) return 1; } } - else { - return 1; - } - return a.exec(); + return 1; }