aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst')
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst11
1 files changed, 8 insertions, 3 deletions
diff --git a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
index 894060e98..c5464640b 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
@@ -60,7 +60,8 @@ signal to the `say_hello()` function:
button.clicked.connect(say_hello)
Finally, we show the button and start the Qt main loop:
-::
+
+.. code-block:: python
# Show the button
button.show()
@@ -68,9 +69,8 @@ Finally, we show the button and start the Qt main loop:
app.exec()
Here is the complete code for this example:
-::
- #!/usr/bin/python
+.. code-block:: python
import sys
from PySide6.QtWidgets import QApplication, QPushButton
@@ -88,3 +88,8 @@ Here is the complete code for this example:
button.show()
# Run the main Qt loop
app.exec()
+
+After a few clicks, you will get something like this on your terminal:
+
+.. image:: clickablebutton.png
+ :alt: Clickable Button Example