Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to develop a "QtCreator plugin"

How to develop a "QtCreator plugin"

Scheduled Pinned Locked Moved General and Desktop
12 Posts 5 Posters 15.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HeartJ
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      There is some manual "here":http://www.vcreatelogic.com/resources/downloads/ (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.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        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 freenode.net) 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:-)

        1 Reply Last reply
        0
        • H Offline
          H Offline
          HeartJ
          wrote on last edited by
          #4

          Thx Denis and Tobias.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            HeartJ
            wrote on last edited by
            #5

            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)

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vsorokin
              wrote on last edited by
              #6

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

              --
              Vasiliy

              1 Reply Last reply
              0
              • H Offline
                H Offline
                HeartJ
                wrote on last edited by
                #7

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

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

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  HeartJ
                  wrote on last edited by
                  #8

                  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 todoplugin.pro, 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!

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kamalakshantv
                    wrote on last edited by
                    #9

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

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      HeartJ
                      wrote on last edited by
                      #10

                      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?

                      1 Reply Last reply
                      0
                      • H Offline
                        H Offline
                        HeartJ
                        wrote on last edited by
                        #11

                        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?

                        1 Reply Last reply
                        0
                        • V Offline
                          V Offline
                          vsorokin
                          wrote on last edited by
                          #12

                          Please, show your .pro file

                          --
                          Vasiliy

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved