A plugin is a dynamically linked library, a DLL on Windows.
QtCreator has a project template for that, called "C++ library".

In a qmake .pro file that is
Qt Code:
  1. TEMPLATE = lib
  2. CONFIG += plugin
To copy to clipboard, switch view to plain text mode 

The rest is up to the plugin interface used by the host application.

Cheers,
_