mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2024-11-04 21:16:56 +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
|
||||
|
||||
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
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#* limitations under the License.
|
||||
#*****************************************************************************/
|
||||
|
||||
QT += core network gui widgets
|
||||
QT += core gui widgets
|
||||
TARGET = luaenginegui
|
||||
TEMPLATE = lib
|
||||
CONFIG += c++11
|
||||
|
|
Loading…
Reference in a new issue