use Dialog instead of MessageBox

This commit is contained in:
Syping 2018-09-15 00:59:18 +02:00
parent 52507c9996
commit 8a6f7311ca
2 changed files with 18 additions and 2 deletions

View file

@ -109,9 +109,25 @@ function editorSaveFile(file)
end
function editorAboutBox()
showMessageBox(InfoMessageBox, "<h4>LE Text Editor</h4>A simple Text Editor made in Lua Engine", "About LE Text Editor", mainWindow)
local dialog = createDialog("About LE Text Editor", mainWindow)
local dialogLayout = createLayout(VerticalLayout, dialog)
local dialogLabel = createLabel("<h4>LE Text Editor</h4>A simple Text Editor made in Lua Engine", dialog)
layoutAddWidget(dialogLayout, dialogLabel)
local buttonLayout = createLayout(HorizontalLayout, dialogLayout)
createSpacerItem(SizePolicyExpanding, SizePolicyMinimum, buttonLayout)
local dialogButton = createPushButton("&OK", dialog)
layoutAddWidget(buttonLayout, dialogButton)
connect(dialogButton, "clicked()", "closeDialog")
setWidgetFixed(dialog)
executeWidget(dialog)
delete(dialog, DeleteInstant)
end
function editorClose()
closeWidget(mainWindow)
end
function closeDialog(pushButton)
disconnect(pushButton, "clicked()")
closeWidget(getParent(pushButton))
end

View file

@ -15,7 +15,7 @@
#* limitations under the License.
#*****************************************************************************/
QT += core network gui widgets
QT += core gui widgets
TARGET = luaenginegui
TEMPLATE = lib
CONFIG += c++11