More info about Krita A.P.I. docker template.

I need some help with the docker template on Krita.
I used the based example from the documentation but I cannot add GUI elements to this area.
Can somebody provide more info or tutorials about this docker template and how can I create buttons, list elements?
Thank you.

Install Python on your system so you have Pip. with Python correctly installed on your OS enviroment (if your windows I dont know about Linux) you use the command pip install PyQt5 on your terminal and it will install PyQt5. Then you can access Qt Designer that is installed alongside it, to add elements to your *.ui file.

You don’t actually need the Qt Designer, though it is helpful. You can just use PyQt widgets since PyQt comes with Krita. For that you’ll need documentation. For example here is QPushButton (just a standard button) documentation: QPushButton Class | Qt Widgets 5.12.11

Here it tells you what you need to import:

qmake: QT += widgets

You’d need to import it like this:

from PyQt5.QtWidgets import QPushButton

And then you can use it like that:

button = QPushButton(“Button text”)

Here you can read a complete, and pretty short, but fully working example of a docker I have in my own plugin: life_drawing_session/life_drawing_session_docker.py · master · Agata Cacko / Life Drawing Session · GitLab (I won’t claim this plugin has the cleanest code as a whole but this one file is pretty clear).

I solve it, and I make a simple tutorial, you can find it on the web and in my work area.