aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/tutorials/basictutorial
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/doc/tutorials/basictutorial')
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst4
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/dialog.rst4
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/qml.rst2
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/tablewidget.rst2
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/treewidget.rst2
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/uifiles.rst4
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgets.rst4
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py2
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst6
9 files changed, 15 insertions, 15 deletions
diff --git a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
index e81e4964a..894060e98 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
@@ -65,7 +65,7 @@ Finally, we show the button and start the Qt main loop:
# Show the button
button.show()
# Run the main Qt loop
- app.exec_()
+ app.exec()
Here is the complete code for this example:
::
@@ -87,4 +87,4 @@ Here is the complete code for this example:
button.clicked.connect(say_hello)
button.show()
# Run the main Qt loop
- app.exec_()
+ app.exec()
diff --git a/sources/pyside6/doc/tutorials/basictutorial/dialog.rst b/sources/pyside6/doc/tutorials/basictutorial/dialog.rst
index da3b336cd..577db27d9 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/dialog.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/dialog.rst
@@ -28,7 +28,7 @@ tutorial, but you can use this stub as is if you need to:
form = Form()
form.show()
# Run the main Qt loop
- sys.exit(app.exec_())
+ sys.exit(app.exec())
The imports aren't new to you, the same for the creation of the
`QApplication` and the execution of the Qt main loop.
@@ -138,4 +138,4 @@ Here is the complete code for this tutorial:
form = Form()
form.show()
# Run the main Qt loop
- sys.exit(app.exec_())
+ sys.exit(app.exec())
diff --git a/sources/pyside6/doc/tutorials/basictutorial/qml.rst b/sources/pyside6/doc/tutorials/basictutorial/qml.rst
index 15fd1da75..0ea346069 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/qml.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/qml.rst
@@ -54,7 +54,7 @@ Let's call it `main.py`:
view.setSource(url)
view.show()
- app.exec_()
+ app.exec()
If you are already familiar with PySide6 and have followed our
tutorials, you have already seen much of this code.
diff --git a/sources/pyside6/doc/tutorials/basictutorial/tablewidget.rst b/sources/pyside6/doc/tutorials/basictutorial/tablewidget.rst
index a041e4116..5c04529fd 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/tablewidget.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/tablewidget.rst
@@ -87,7 +87,7 @@ a ``QTableView``, but that is not in the scope of this tutorial.
.. code-block:: python
table.show()
- sys.exit(app.exec_())
+ sys.exit(app.exec())
The final application will look like this:
diff --git a/sources/pyside6/doc/tutorials/basictutorial/treewidget.rst b/sources/pyside6/doc/tutorials/basictutorial/treewidget.rst
index 26f29e1f0..b286de507 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/treewidget.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/treewidget.rst
@@ -69,7 +69,7 @@ information in trees. You can also create a data model and display it using a
.. code-block:: python
tree.show()
- sys.exit(app.exec_())
+ sys.exit(app.exec())
The final application will look like this:
diff --git a/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst b/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst
index fa483a302..579fc5ebb 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst
@@ -112,7 +112,7 @@ To understand the idea, let's take a look at the whole code:
window = MainWindow()
window.show()
- sys.exit(app.exec_())
+ sys.exit(app.exec())
What is inside the *if* statement is already known from the previous
examples, and our new basic class contains only two new lines
@@ -177,7 +177,7 @@ The complete code of this example looks like this:
sys.exit(-1)
window.show()
- sys.exit(app.exec_())
+ sys.exit(app.exec())
Then to execute it we just need to run the following on a
command prompt:
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgets.rst b/sources/pyside6/doc/tutorials/basictutorial/widgets.rst
index d86ba2623..89bd23f63 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgets.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgets.rst
@@ -14,7 +14,7 @@ Here is a simple example of a Hello World application in PySide6:
app = QApplication(sys.argv)
label = QLabel("Hello World!")
label.show()
- app.exec_()
+ app.exec()
For a widget application using PySide6, you must always start by
@@ -40,6 +40,6 @@ After the creation of the application object, we have created a
.. note:: After creating the label, we call `show()` on it.
-Finally, we call `app.exec_()` to enter the Qt main loop and start
+Finally, we call `app.exec()` to enter the Qt main loop and start
to execute the Qt code. In reality, it is only here where the label
is shown, but this can be ignored for now.
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py
index 69caf177f..9db878b0c 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py
@@ -92,4 +92,4 @@ if __name__ == "__main__":
_style = f.read()
app.setStyleSheet(_style)
- sys.exit(app.exec_())
+ sys.exit(app.exec())
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst
index 6c83c1fbf..a4e937a2e 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst
@@ -21,7 +21,7 @@ to each component. As an example, look at the following simple snippet:
w = QLabel("This is a placeholder text")
w.setAlignment(Qt.AlignCenter)
w.show()
- sys.exit(app.exec_())
+ sys.exit(app.exec())
When you execute this code, you will see a simple `QLabel` aligned at the
center, and with a placeholder text.
@@ -53,7 +53,7 @@ so let's see how does the code look like with these changes:
font-size: 18px;
""")
w.show()
- sys.exit(app.exec_())
+ sys.exit(app.exec())
Now when you run the code, notice that the `QLabel` looks different with your
custom style:
@@ -130,7 +130,7 @@ the file and using the `QApplication.setStyleSheet(str)` function:
_style = f.read()
app.setStyleSheet(_style)
- sys.exit(app.exec_())
+ sys.exit(app.exec())
Having a general `qss` file allows you to decouple the styling aspects of
the code, without mixing it in the middle of the general functionality, and you