aboutsummaryrefslogtreecommitdiffstats
path: root/examples/smallmenu/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/smallmenu/__init__.py')
-rw-r--r--examples/smallmenu/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/smallmenu/__init__.py b/examples/smallmenu/__init__.py
index 5dcfef9..f26b637 100644
--- a/examples/smallmenu/__init__.py
+++ b/examples/smallmenu/__init__.py
@@ -41,27 +41,27 @@
# This example illustrates the use of action
# containers to create new menus
-from actions import hello, goodbye
+from .actions import hello, goodbye
import examples_common
-from PythonExtension import QtCreator
+from QtCreator import Core
from PySide2.QtCore import QObject, SIGNAL
from PySide2.QtWidgets import QAction
# Create submenu and add it to examples menu
menuId = "PythonExtensions.Examples.SmallMenu"
-menu = QtCreator.Core.ActionManager.createMenu(menuId)
+menu = Core.ActionManager.createMenu(menuId)
menu.menu().setTitle("Small Menu")
examplesMenu = examples_common.ensureExamplesMenu()
examplesMenu.addMenu(menu)
# Add actions to our new menu
helloAction = QAction("Say Hello")
-command = QtCreator.Core.ActionManager.registerAction(helloAction, 'PythonExtensions.Examples.SayHello')
+command = Core.ActionManager.registerAction(helloAction, 'PythonExtensions.Examples.SayHello')
QObject.connect(helloAction, SIGNAL('triggered()'), hello)
menu.addAction(command)
goodbyeAction = QAction("Say Goodbye")
-command = QtCreator.Core.ActionManager.registerAction(goodbyeAction, 'PythonExtensions.Examples.SayGoodbye')
+command = Core.ActionManager.registerAction(goodbyeAction, 'PythonExtensions.Examples.SayGoodbye')
QObject.connect(goodbyeAction, SIGNAL('triggered()'), goodbye)
menu.addAction(command)