diff options
Diffstat (limited to 'sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst')
-rw-r--r-- | sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst index e81e4964a..c5464640b 100644 --- a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst +++ b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst @@ -60,17 +60,17 @@ 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() # Run the main Qt loop - app.exec_() + app.exec() Here is the complete code for this example: -:: - #!/usr/bin/python +.. code-block:: python import sys from PySide6.QtWidgets import QApplication, QPushButton @@ -87,4 +87,9 @@ Here is the complete code for this example: button.clicked.connect(say_hello) button.show() # Run the main Qt loop - app.exec_() + app.exec() + +After a few clicks, you will get something like this on your terminal: + +.. image:: clickablebutton.png + :alt: Clickable Button Example |