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!
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/ .
Cheers!
Nice, thanks š
I guess it’s faster than using KAppTemplate.
LikeLike
Why not use the kapptemplate app in QtCreator for KDE Templates?
LikeLike
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?
LikeLike
Well, or just use KDevelop.
LikeLike
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.
LikeLike
Why Qt Creator? What’s wrong with KDevelop?
LikeLike
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 š
LikeLike
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.
LikeLike
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.
LikeLike
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.
LikeLike
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!
LikeLike
@Jan, @David Edmundson, @Z : you’re welcome š
Keep in mind that those template are really simple, so any suggestion about further extesions are appreciated.
LikeLike
Now all that is needed is for QtCreator to use OCS* (fd.o) and build a store so users can install and share templates easily š
* http://freedesktop.org/wiki/Specifications/open-collaboration-services
LikeLike
+1
This would be an awesome feature š
LikeLike
+1000
LikeLike
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!
LikeLike
Yep I know that, still I can’t get how this info is related to my post š
LikeLike
thanks a lot guy. you win 1 free internets
LikeLike
Hello,
Your link for git repo doesn’t work, can you repair or put them somewhere?
LikeLike
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 š
Cheers!
LikeLike
What is the current status? Is kde5 plasma supported?
LikeLike
The current status is unmantained, since I’m not actively developing anymore in KDE (sadly). You’re free to pick up the code and modify as needed to support KDE5 as well :
LikeLike
FUCK YEAH! That should be added as default ;p thanks you dude!
LikeLike