Access and control the dockers that come with Krita
Dockers are all the panels in Krita that you can move around and attach to the sides. They can float around or dock and be part of a tab system. Through scripting we have access to these dockers if we wish to make changes or control them. To get a list of all the dockers that we are available we can do something like this.
From this list we can do many things. Since we have a full list and can see their names, we can grab a specific docker and do actions on it like hiding and showing.
One you have a reference to a docker, you can start manipulating its properties. Here is one example of looking for the advanced color selector, then toggling its visibility on and off
Because of how dockers stack, it is possible that after you show a docker, it will be inactive because there are other dockers already in the same area. You might want to force the docker to appear instead of people having to click the inactive tab to active it. This is how you would do that.
I also re-arranged the code a bit to see how you can save references to specific dockers. This could be helpful if you wanted to add a UI where clicking buttons would trigger the visibility state.
There are additional things that you can control in dockers beyond this. There are things like editing the title bar and modifying what areas you allow the docker to be docked on.
The docker functionality that Krita uses is part of the PyQt library. Because of this, we have a large amount of functionality available for us. Here is the Qt documentation for the QDockWidget with what we can do. If you aren't familiar with C++ and how to use an API reference, you might want to take a look at the PyQt5 reference page to see how to look through the API or translate C++ to Python.
Head to the Krita artists where we have a dedicated area for plugin development and give any feedback you might have.