Preparation

Before developing the Dock plugin, you need to install some of the package and tools to assist the developing work. Execute the following command in terminal:

 sudo apt-get install dde-dock-dev build-essential qt5-qmake qt5-default qtcreator

In these packages, the qt5-default is optional, mainly configure qt5 instead of qt4 as the default development environment. If you don’t understand this, install qt5-default directly.

Example   API Documentation   Upload

 

Introduction with Images

1. Open QtCreator, created a new “Qt Plugin” project, for example, named “helloworld”.

deepin-dock-pluginapi1

deepin-dock-pluginapi2

2. Created a class named “HelloWorldPlugin” as the entry point of the plugin.

deepin-dock-pluginapi3

3. After created the project, you need to modify some of the created project config.