The next version (2.3) of GCF should (ideally) have a plugin for Qt Creator that will make creation and maintenance of GCF applications with Qt Creator easy. We started our progress towards that end by studying Qt Creator and understanding how plugins for it can be written. The result of that effort is a small document that explains a Qt Creator newbie how to write plugins. The document is a work in progress, but I am sure that it will be a useful starting point for Qt Creator plugin developers. Have a look at if for yourself, we would love to hear feedback from you.
URL: http://www.vcreatelogic.com/resources/downloads/. Click on the “Other Downloads” tab.
5th September Update: Added a chapter on providing editors for new file types in Qt Creator
11th September Update: Added a section (2.6) on building plugins located outside Qt Creator source. [Thanks to Eike Ziller for helping with this one]
Comments
13 responses to “Document on Writing plugins for Qt Creator”
Good stuff!
Very nice and detailed! Personally, I have never really dived into Qt creator code, but your document was quite informative on how the plugin system is designed.
On a side note – Maybe you should enable openId/anonymous comments 🙂 It currently, forces me to create a LiveJournal account. I like the doc so much that I actually went through the pain of creating an account to comment!
Re: Good stuff!
Thanks man.. More chapters getting added to the document shortly.
BTW. I have just enabled anonymous comments 🙂
Thank you!
Very nice, and a good starting point.
I found a little error (chapter 2.1, create a plugin project in Qt Creator). You need to change PROVIDER, and not only DESTDIR (and you don’t need to change DESTDIR if you change PROVIDER):
PROVIDER = VCreateLogic
If you don’t change it, then the *.pluginspec file will be copied in $$IDE_PLUGIN_PATH/Nokia, and not in your DESTIDR => the plugin won’t load.
Tested with the git master of Qt creator, maybe it’s new compare to older version.
nicolas
Re: Thank you!
Thanks for the fix. Will include it in the next revision of the doc and upload the same.
Re: Chapter 2.1 using PROVIDER
Hi,
the Version 2 document is not fixed properly
use the PROVIDER command before including qtcreatorplugin.pri
leave the DESTDIR completly – this will be set by the pri
in text:
PROVIDER =
include( ../../qtcreatorplugin.pri )
include( ../../plugins/coreplugin/coreplugin.pri )
franklin42@online.de
Creator Plugin
hi, thanks for the great description.
I’m eager to read more exspecially about editor plugins.
BTW did you already figure out something about the CodePaster Plugin.
I digged all the way QtCreator Page, Blogs and Wiki and did not find any comment.
Is this troll intern stuff only?
If it is the thing which i assume it might be a mighty feature which my “Qt-Creator-Personality” must have.
franklin42
Re: Creator Plugin
Thanks.
An updated version of the doc is now available for download; it contains a chapter on editor plugins.
I haven’t done any study on code-paster. So, I dont know. But I dont think it is internal; because I can notice a src/plugins/cpaster folder in the code. I suspect it contains the code-paster code, but then I am not really sure.
Hi Prashanth
Thanks for a very good document. I’m curious about what features a GCF plugin will have? What are your goals with such a plugin?
Lastly, good job with the new VCreateLogic look (website and document format). It looks very professional, and easy to read.
GCF plugin for Qt Creator will
– Provide a GCF Application Wizard in the File -> New dialog box. This will basically provide a wizard like CreateAppTemplateWizard and help you to create a new GCF application from scratch.
– Once the application is created; the plugin will automatically load the project in Qt Creator. Custom (GCF only) environment variables and build arguments required for the building and running the app are automatically provided to Qt Creator.
– User can edit GUIXML files within Qt Creator on a per-component basis. The global ComponentCreatorComponent.xml will also be made available in Qt Creator for editing. By this we mean that the XML files are listed in the project tree in the left navigation panel.
– User can right click on the project node in the navigation panel and select “Add Component” to create and add a new component.
These are the goals we have set out for the next release in December. We do have more planned features for the plugin, which we plan to blog-about/announce at a later date.
Thanks for your comments on the website. The credit goes to Kamal from http://eficacy.com.
Cool Doc.
I think still some part of the doc is not fixed as in related to .pro file
The “PROVIDER” and “DESTDIR” .. stuff but its fine other then this its just a cool doc.. and now I am transferring my python code to Qt Creator Plug-in. you will get it soon..
—
Abhishek
Document Version
Hi!, great job with this document! is helping a lot… i have a sugestion, can be posible to add the version to the document name, this way is posible keep tracking the changes of the document and for haps add a change log inside…
again great job, cheers
JCRJ
Re: Document Version
Got that.. Will do!
Hi Prashanth,
First of all, I liked the tutorial about writing QtCreator plugins.
I tried to do the html editor example, but I didn’t found HtmlEditorWidgetData definition there. I used the following:
struct HtmlEditorWidgetData
{
QWebView *webView;
QPlainTextEdit *textEdit;
bool modified;
QString path;
};
And it seems to work. Can you add it into the next version of the doc?
BR
Vladimir