diff options
Diffstat (limited to 'sources/pyside6/doc/faq')
-rw-r--r-- | sources/pyside6/doc/faq/typesoffiles.rst | 16 | ||||
-rw-r--r-- | sources/pyside6/doc/faq/whatisqt.rst | 6 | ||||
-rw-r--r-- | sources/pyside6/doc/faq/whatisshiboken.rst | 6 | ||||
-rw-r--r-- | sources/pyside6/doc/faq/whichide.rst | 16 | ||||
-rw-r--r-- | sources/pyside6/doc/faq/whyqtforpython.rst | 19 |
5 files changed, 29 insertions, 34 deletions
diff --git a/sources/pyside6/doc/faq/typesoffiles.rst b/sources/pyside6/doc/faq/typesoffiles.rst index 71d38f809..3155b24fc 100644 --- a/sources/pyside6/doc/faq/typesoffiles.rst +++ b/sources/pyside6/doc/faq/typesoffiles.rst @@ -36,9 +36,10 @@ functionality to your applications. User Interface Definition File ``.ui`` -------------------------------------- -When using Qt Designer, you can create user interfaces using Qt Widgets with -the WYSIWYG form editor, this interface is represented as a widget tree using -XML. Here is an extract of the beginning of a ``.ui`` file: +When using *Qt Widgets Designer*, you can create user interfaces using +Qt Widgets with the WYSIWYG form editor, this interface is represented +as a widget tree using XML. Here is an extract of the beginning of a +``.ui`` file: .. code-block:: xml @@ -58,7 +59,6 @@ XML. Here is an extract of the beginning of a ``.ui`` file: <string>MainWindow</string> </property> <widget class="QWidget" name="centralWidget"> - ... The `pyside6-uic` tool generates Python code from these `.ui` files, which you can import from your main files, so it is not necessary @@ -97,8 +97,8 @@ the QML file, and optionally, elements defined in Python that are exposed to QML to be used. You can write ``.qml`` files by hand, but also you can use tools like the -QML Designer that is embedded in Qt Creator. Additionally, there are commercial -tools like Qt Design Studio that allow you to load designs from other design +*QML Designer* that is embedded in *Qt Creator*. Additionally, there are commercial +tools like *Qt Design Studio* that allow you to load designs from other design applications. Here you can find an example of how a ``.qml`` file looks like. @@ -128,11 +128,11 @@ message on it. Qt Creator Python Project File ``.pyproject`` --------------------------------------------- -For Qt Creator to load and handle Python based projects, a special file is +For *Qt Creator* to load and handle Python based projects, a special file is needed, because C++ based projects could be handle from ``.qmake`` or ``CMakeLists.txt`` file, which are not used with Python-based projects. -Old versions of Qt Creator, provided a simple format with the ``.pyqtc`` +Old versions of *Qt Creator*, provided a simple format with the ``.pyqtc`` extension, which were plain-text files with one-file-per-line:: library/server.py diff --git a/sources/pyside6/doc/faq/whatisqt.rst b/sources/pyside6/doc/faq/whatisqt.rst index 2dee661a7..3b42a9403 100644 --- a/sources/pyside6/doc/faq/whatisqt.rst +++ b/sources/pyside6/doc/faq/whatisqt.rst @@ -25,7 +25,7 @@ As a framework, Qt has many components, which are distributed by components and modules, for example, `qtbase <https://code.qt.io/cgit/qt/qtbase.git/>`_ is the base component that holds many modules, like: ``QtCore``, ``QtGui``, ``QtWidgets``, ``QtNetwork``, etc. -All those modules contains many classes that you can directly use, like the +All those modules contains many classes that you can directly use, like the case of the `Classes of QtCore <https://doc.qt.io/qt-6/qtcore-module.html>`_ from which you can find classes like ``QFile``, ``QTime``, ``QByteArray``, etc. @@ -65,8 +65,8 @@ is not to affect the user experience compared to other included applications. .. note:: You can adapt these applications to use your self-made style, but you need to be aware that the goal of Widgets is to respect the system - style, be careful when changing colors. Check this `simple tutorial - <widgetstyling>`_ on how to do so. + style, be careful when changing colors. Check this + :ref:`simple tutorial <widgetstyling>` on how to do so. QML --- diff --git a/sources/pyside6/doc/faq/whatisshiboken.rst b/sources/pyside6/doc/faq/whatisshiboken.rst index e867fadd4..bf6d19ab3 100644 --- a/sources/pyside6/doc/faq/whatisshiboken.rst +++ b/sources/pyside6/doc/faq/whatisshiboken.rst @@ -4,11 +4,9 @@ Binding Generation: What Is Shiboken? ===================================== When you install ``PySide6`` you might have notice that also ``Shiboken6`` -is installed as a dependency: +is installed as a dependency:: -.. code-block:: bash - - (env) [qt ~]$ pip install pyside6 + $ pip install pyside6 Collecting pyside6 Downloading PySide6-6.0.0-6.0.0-cp36.cp37.cp38.cp39-abi3-manylinux1_x86_64.whl (170.5 MB) |████████████████████████████████| 170.5 MB 42 kB/s diff --git a/sources/pyside6/doc/faq/whichide.rst b/sources/pyside6/doc/faq/whichide.rst index ec005a188..3afa79b7f 100644 --- a/sources/pyside6/doc/faq/whichide.rst +++ b/sources/pyside6/doc/faq/whichide.rst @@ -4,7 +4,7 @@ Which IDEs Are Compatible? ========================== |project|, as any other Python module, can be used in any Python-compatible -IDE, but not all of them will provide extra functionality like Qt Creator does. +IDE, but not all of them will provide extra functionality like *Qt Creator* does. Besides writing files, there are some external steps you might want to perform in order to help the development of your applications: @@ -15,8 +15,8 @@ From a terminal: :command:`pyside6-uic -i form.ui -o ui_form.py` * Generating a Python file from a ``.qrc`` file: :command:`pyside6-rcc -i resources.qrc -o rc_resources.py` -* Opening Qt Designer with the command :command:`pyside6-designer` to - edit/create ``.ui`` files. +* Opening *Qt Widgets Designer* with the command :command:`pyside6-designer` + to edit/create ``.ui`` files. External add-ons/plugins from your favorite IDE might include configuration steps to run these commands, or open external tools like Designer and @@ -47,8 +47,10 @@ that you can install from VS Code while writing the following on the Quick Open PyCharm ------- -You can configure PyCharm to enable external tools, in |project| terms, Qt Designer, and -Qt Creator. Go to ``File > Settings > tools > PyCharm External Tools``, and include the following +You can configure PyCharm to enable external tools, in |project| terms, +*Qt Widgets Designer*, and *Qt Creator*. Go to +``File > Settings > tools > PyCharm External Tools``, and include the following information to add them to your project. -Later, you will be able to right click a ``.ui`` file, and select ``Qt Designer``, -``pyside6-uic``, or any tool that you configured this way. +Later, you will be able to right click a ``.ui`` file, and select +``Qt Widgets Designer``, ``pyside6-uic``, or any tool that you configured this +way. diff --git a/sources/pyside6/doc/faq/whyqtforpython.rst b/sources/pyside6/doc/faq/whyqtforpython.rst index 6046249b9..0f0ab9aaf 100644 --- a/sources/pyside6/doc/faq/whyqtforpython.rst +++ b/sources/pyside6/doc/faq/whyqtforpython.rst @@ -10,7 +10,7 @@ Why Qt for Python? <div style="float: right; padding-left: 20px; max-width: 30%; background-color: #e9eff5; padding-top: 5px;"> - <img src="../../_images/tiobe.png" + <img src="../_images/tiobe.png" style="width: 90%;" alt="TIOBE index for Python" /> <p style="font-size: 80%;"> @@ -67,13 +67,9 @@ Creating Qt applications in Python requires only a few lines of code, and not much configuration is required to execute it. As an /unfair/ example, let's check the code of a simple hello world application: +.. tab-set:: -.. panels:: - :container: container-lg - - :column: col-lg-6 p-2 - - .. tabbed:: C++ Header + .. tab-item:: C++ Header .. code-block:: cpp @@ -96,7 +92,7 @@ example, let's check the code of a simple hello world application: #endif // MAINWINDOW_H - .. tabbed:: C++ Implementation + .. tab-item:: C++ Implementation .. code-block:: cpp @@ -115,7 +111,7 @@ example, let's check the code of a simple hello world application: m_button->setText("Ready"); } - .. tabbed:: C++ Main + .. tab-item:: C++ Main .. code-block:: cpp @@ -130,10 +126,9 @@ example, let's check the code of a simple hello world application: return app.exec(d); } - --- - :column: col-lg-6 p-2 +.. tab-set:: - .. tabbed:: Python + .. tab-item:: Python .. code-block:: python |