Tutorial4: Add images
Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
parent
6d3003313a
commit
367c2cbef9
@ -23,11 +23,16 @@ The parameter menu is the menu into which the new entry / action will be added.
|
|||||||
msgBox.exec_()
|
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'.
|
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)
|
The full code can be found at [extensions/Tutorial4](../extensions/Tutorial4)
|
||||||
|
|
||||||
**Note:** Always create an instance of Action in `populateExtensionsMenu`.
|
**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
|
[1]: https://doc.qt.io/qtforpython/PySide2/QtWidgets/QMessageBox.html
|
||||||
|
BIN
images/Tutorial4/ExtensionMenu.png
Normal file
BIN
images/Tutorial4/ExtensionMenu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
BIN
images/Tutorial4/MessageBox.png
Normal file
BIN
images/Tutorial4/MessageBox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
Loading…
Reference in New Issue
Block a user