Important: Please read the Qt Code of Conduct -

How to develop a "QtCreator plugin"

  • Hi, I installed the QtCreator 2.0.93 and I saw there was a new choose called "Qt Creator plugin".

    And I found that I can add a new button called "Hello World" in the list which includes "Welcome, Edit, Design, Debug, Projects, Help" lied left in QtCreator. I added it through choosing "Help-about plugins-Hello world".

    Who can tell me how to develop this plugin. And I know FakeVim is also a plugin for QtCreator. I just want to do it.

    Please show me some tutorials or some posts.

    Thx very much!

  • There is some manual "here": (go to Other downloads section and you will find it). But it is a bit outdated. All in all it will help you to find out what source files of creator you should look into to receive answers you will need during plugin development.

  • Moderators

    Check src/plugins in the Qt Creator sources. Almost all the functionality is implemented as a plugin! Just pick some existing functionality that is close to what you want to do and get started:-)

    Feel free to stop by in our IRC channel (#qt-creator on if you have questions.

    PS: The guide by vcreatelogic is somewhat outdated and in places just plain wrong. Better check the docs found in the Qt Creator sources, we do ship an (also somewhat outdated) guide there, too. We will of course accept merge requests that help us improve the guide:-)

  • Thx Denis and Tobias.

  • I found there was a new option "Qt Creator plugin" project in QtCreator2.1-rc. But I cann't build any "Qt Creator plugin" project, such as a project made by the wizard.

    And it shows "cann't find -lAggregation"

    So who can show me how I should do.

    I download the source "qt-creator-2.1.0-rc1-src" and "qt-creator-win-opensource-2.1.0-rc1.exe". My OS is windows xp.

    The following are my steps(use ):

    1. select to create a "Qt Creator plugin" project
    2. choose the folder of "qt-creator-2.1.0-rc1-src" for "QtCreator source" and choose the folder of "qtcreator-2.0.94"(where I installed "qt-creator-win-opensource-2.1.0-rc1.exe") for "QtCreator build"
    3. Build the project
      And it failed.

    (Sorry for my bad english)

  • HeartJ,
    Try add in your pro file
    @LIBS += -L$$QTC_BUILD_TREE/lib/qtcreator/

  • [quote author="Vass" date="1293718040"]HeartJ,
    Try add in your pro file
    @LIBS += -L$$QTC_BUILD_TREE/lib/qtcreator/

    I tried as your said, but it doesn't work.

  • My environments are :
    1.My OS is windows xp.
    2.I installed "qt-win-opensource-4.7.1-mingw.exe".
    3.I also installed "qt-creator-win-opensource-2.1.0-rc1.exe" and the path is "D:\Qt\qtcreator-2.0.94".
    4.I downloaded the source package "qt-creator-2.1.0-rc1-src.tar.gz" and extracted it into "D:\qt-creator-2.1.0-rc1-src".

    Beacuse my new “Qt Creator plugin” project failed as I said above, so I downloaded "todo plugin" for try.

    I made changes in pro file as the INSTALL file said :
    1. Download QtCreator sources.
    2. Build QtCreator from sources or download and install binary.
    3. Change, You need QTC_BUILD_DIR set to your path to qtcreator binary and set QTC_SOURCE_DIR your path to qtcreator source.

    I set "D:\Qt\qtcreator-2.0.94" for QTC_BUILD_DIR and "D:\qt-creator-2.1.0-rc1-src" for QTC_SOURCE_DIR. Is there anything wrong?

    Build after these using QtCreator(qtcreator-2.0.94), and it showed "*cannot find -lAggregation*" in Build Issues.
    In compile output, it showed "d:/qt/qtcreator-2.0.94/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lAggregation

    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [....\Qt\qtcreator-2.0.94\lib\qtcreator\plugins\vsorokin\todo.dll] Error 1
    mingw32-make: *** [release] Error 2"

    I really wanna learn develop plugin for QtCreator, please help me.

    Happy New Year!

  • Any idea what library -lAggregation is. Where it is being used?

  • It works!!!

    I build the source of qtcreator used "Qt 4.7.1 Command Prompt"(run "qmake "CONFIG+=release" and "mingw32-make") and I got "qtcreator.exe" in "qt-creator-2.1.0-rc1-src\bin".

    And I changed "*QTC_BUILD_DIR *" the same as "QTC_SOURCE_DIR" in pro file. SO it build successfully.

    But I found that the "todo.dll" can be used in the qtcreator which I build with source, and it cannot work in the qtcreator which I got form installing "qt-creator-win-opensource-2.1.0-rc1.exe".
    It shows that "*the plugin uses incompatible Qt library. Expected build key "Windows msvc release full-config", got "Windows mingw release full-config" *".
    What does it mean?

  • Another question, I create a new "QtCreator Plugin" project, assigned the source path and the build path. But I build it failed with the same wrong "cann’t find -lAggregation".

    If I changed the project from debug into release, it was built successfully.

    Do I build the project release only?

  • Please, show your .pro file

Log in to reply