diff --git a/articles/4. Adding entry to the extension menu.md b/articles/4. Adding entry to the extension menu.md index d27c0fd..7516fc7 100644 --- a/articles/4. Adding entry to the extension menu.md +++ b/articles/4. Adding entry to the extension menu.md @@ -23,11 +23,16 @@ The parameter menu is the menu into which the new entry / action will be added. msgBox.exec_() ``` +![Extension menu](../images/Tutorial4/ExtensionMenu.png) + +![Extension menu](../images/Tutorial4/MessageBox.png) + In this example the action will show messagebox[1] with 'Tutorial 4 - Message from extension menu'. The full code can be found at [extensions/Tutorial4](../extensions/Tutorial4) **Note:** Always create an instance of Action in `populateExtensionsMenu`. -It will be deleted / destroyed when the menu is hidden. +It will be deleted / destroyed when the menu is hidden. +Do **not** try to add keyboard shortcut to the action used to construct the menu, it will not work properly. [1]: https://doc.qt.io/qtforpython/PySide2/QtWidgets/QMessageBox.html diff --git a/images/Tutorial4/ExtensionMenu.png b/images/Tutorial4/ExtensionMenu.png new file mode 100644 index 0000000..0f45d42 Binary files /dev/null and b/images/Tutorial4/ExtensionMenu.png differ diff --git a/images/Tutorial4/MessageBox.png b/images/Tutorial4/MessageBox.png new file mode 100644 index 0000000..dfc81bb Binary files /dev/null and b/images/Tutorial4/MessageBox.png differ