add shortcuts

This commit is contained in:
Syping 2018-09-09 19:01:57 +02:00
parent 47fbb8c2a9
commit 0ba59e0b79

View file

@ -28,9 +28,11 @@ function main()
local menuBar = createMenuBar(mainWindow)
local menuFile = createMenu("File", menuBar)
local menuEntryExit = createMenuEntry("Exit", menuFile)
setMenuShortcut(menuEntryExit, "Alt+F4")
connect(menuEntryExit, "triggered()", "closeWindow")
local menuHelp = createMenu("Help", menuBar)
local menuEntryAbout = createMenuEntry("About LuaEngine", menuHelp)
setMenuShortcut(menuEntryAbout, "Ctrl+P")
connect(menuEntryAbout, "triggered()", "showAboutBox")
local labelLayout = createLayout(HorizontalLayout, mainLayout)