Skip to content
  • Thiago Sueto's avatar
    Add PyQt tutorial · aac2c6a6
    Thiago Sueto authored
    This is a continuation of https://invent.kde.org/documentation/develop-kde-org/-/merge_requests/270, which in turn is based on [Dimitris Kardarakos' tutorial](https://dimitris.cc/kde/2022/02/26/pyside-blog-post.html). I kept the previous commits for credit to Helio.
    
    I switched from PySide to PyQt because PySide does not have a flatpak Baseapp, which makes it a huge deterrent for package distribution. TQC changed from Boost.Python in PySide2 to Shiboken for PySide6 (for good reasons) but building Shiboken is a pain in flatpak (it requires specifying all build dependencies for it in the manifest). With PyQt it's basically as straightforward as can be for both PyQt5 and PyQt6, and I tested this extensively on both.
    
    Besides, my biased impression is that PyQt is the more mature solution (even though it's not from TQC), the docs for PyQt are much, much better, and switching from PyQt to PySide is simple as the two are similar.
    
    The tutorial is Linux based, though I'd like to extend it to Windows later on (out of scope for this MR).
    
    I named the group Python in case we want to add PySide tutorials in the future.
    
    I changed the structure from `simple-md-viewer-project/simplemdviewer` to `simplemdviewer/src`, which is more in line with what we do at KDE.
    
    The previous MR can be viewed at: https://kdocs.rabbitictranslator.com/pyside/public/docs/use/pyside/linux_applications_with_python_and_qml/
    
    The present MR can be viewed at: https://kdocs.rabbitictranslator.com/pyqt/public/docs/getting-started/python/
    
    I still need to:
    
    - [x] Update the screenshots
    - [x] ~~Probably change the group name from "Python with Kirigami" to something not explicitly bound to Kirigami (in case we want QtWidgets for example)~~ Let's keep it this way for now, and rename it when we add one for QtWidgets.
    aac2c6a6