mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2024-12-22 11:55:29 +01:00
use Dialog instead of MessageBox
This commit is contained in:
parent
52507c9996
commit
8a6f7311ca
2 changed files with 18 additions and 2 deletions
|
@ -109,9 +109,25 @@ function editorSaveFile(file)
|
||||||
end
|
end
|
||||||
|
|
||||||
function editorAboutBox()
|
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
|
end
|
||||||
|
|
||||||
function editorClose()
|
function editorClose()
|
||||||
closeWidget(mainWindow)
|
closeWidget(mainWindow)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function closeDialog(pushButton)
|
||||||
|
disconnect(pushButton, "clicked()")
|
||||||
|
closeWidget(getParent(pushButton))
|
||||||
|
end
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#* limitations under the License.
|
#* limitations under the License.
|
||||||
#*****************************************************************************/
|
#*****************************************************************************/
|
||||||
|
|
||||||
QT += core network gui widgets
|
QT += core gui widgets
|
||||||
TARGET = luaenginegui
|
TARGET = luaenginegui
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
Loading…
Reference in a new issue