KDE project template(s) for QtCreator

Laziness is such a great virtue, sometimes šŸ˜€

Yesterday I was sitting in front of my computer, ready to start an application from scratch, and I felt very bored when I thought about all the files I need to create every time in order to have a minimal and functional application to start with. You have to write a CMakeLists file (and every time I forget to set some vars, or make some stupid typo), a .desktop file, a main.cpp source file and a class.h/cpp files. Oh God, why QtCreator doesn’t ship with some simple and handy template for KDE projects?

So I sat down, learned how to build a custom template wizard, and here you go: I made three project wizard: one for KDE console app, one for GUI ones, and the last is a plasmoid wizard template šŸ™‚

And, of course, now I’m gonna showing you some screenshots!


Overview of the Projects page

Overview of the options inside the KDE gui project page

Overview of the options inside the Plasma Applet project page

Final result

Of course these wizards are far from being complete, so any comment/suggestion/critics is highly appreciated šŸ™‚

You can grab the templates by cloning my repository:

$git clone git://anongit.kde.org/scratch/casella/qtcreator_kde_wizards

and then simply copy the folders under $HOME/.config/Nokia/qtcreator/templates/wizards or /share/qtcreator/templates/wizards/ .


23 responses to “KDE project template(s) for QtCreator

    • Look closely at the pictures I took; everything is being done whithin QtCreator.
      So, why on earth should I use two different apps (kapptemplate to build the basic hierarchy, and then switch to QtCreator to start the development process), when everything is being done inside QtCreator, thanks to its template system?


  1. Thank you very much! I must have created a project in QtCreator so many times only to manually update everything to KDE style a few days afterwards.

    This sounds great.


    • KDevelop is a great app (I keep building it along with all the other kde modules, and I try it twice or thrice in a month), but I prefer the simplicity of QtCreator’s UI. There are other usability flaws imho, such as KDevelop’s all-in-one-tooltips; they shows A LOT of information, and if you click on its links, the popup get even bigger and I think this is nonsense because, if you want to provide a lot of infos, a better approach would be to open a new tab or a dock and put everything there, instead of occluding 25% of the text area. The menu suffers of usability issues too (the File|Edit menuitems should be first and second, not fourth ad fifth).
      That’s the power of opensource, anyway: freedom of choiches šŸ™‚


      • fully agree with that, KDevelop looks nice, works nice but in the end, QtCreator allows you to get more done by not bothering you. I use it only, if I am not using Qt, I use vim, and thats it.


  2. KDevelop uses only *templates* from KAppTemplate (not the GUI itself) and QtCreator could probably do the same. KDevelop users do not start KAppTemplate of course.
    You’ll find after a while that you cannot update your templates fast enough to keep them current and that you would get a far wider range of them by using the KAppTemplate ones (plasma, akonadi, plugins, bindings,…)

    I never used QtCreator so I do not know if it’s possible to do as KDevelop does.


    • Thanks for the hint šŸ™‚
      However I simply shared three templates which I’ve found to be the most used from my perspective; my intent is not to provide a replacement to kapptemplate, but simply to create a starting point for my personal needs. Then, I shared it with the hope to help other people in my same situation, that’s all šŸ™‚

      Funny side-note: just opened kapptemplate, and I couldn’t find a template for a plain, KMainWindow derived class.


  3. Call me lazy, but this is a big reason why I have not developed much using KDE libraries: no simple way to just set up a project within a few seconds, and integrating it with my IDE of choice, Qt Creator.
    For me this is great news. Thank you!


  4. It’s good to give more options for people who want to contribute with KDE. Those who prefer Qt Creator will benefit from this, it is not a matter of Qt Creator x KDevelop, which is a great IDE too!

    Just my 2 cents: If you download a qch file from http://api.kde.org and include in the Qt Creator’s database (tools->options->help->documentation), F1 will show the docs for KDE classes in the same way it does for Qt classes.

    PS: It may sound obvious, but we can’t forget the newcomers!


    • Sorry for my veeery late reply (I’m very busy with my university exams atm >.<), seems like quickgit.kde.org was unresponsive with all the scratch repos in there.
      However I've git cloned successfully my repo now, and it's working, so you can grab the template if you still need them šŸ™‚


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s