April Fools’ passed, it’s safe to blog again ðŸ™‚
Koen happens to be the guy who created Wt (pronounced ‘witty’), a C++ library and application server for developing and deploying web applications. The API mimics Qt‘s: it is widget-centric and offers complete abstraction of any web-specific application details. Where Qt has QObject, Wt has WObject; where Qt has QPainter, Wt has WPainter; both provide a very similar Model-View architecture, both have signals and slots (Wt’s being based on Boost), both provide an OpenGL widget (WebGL in the case of Wt), both allow for language translations, and in fact you can combine Qt and Wt code thanks to the wtwithqt bridge.
Wt is not without its problems, though. In my opinion, the main needs of Wt are more widgets and an IDE. Today I’m going to talk about the IDE.
Developing a new IDE from scratch would be a daunting task, therefore I think we have to discard that until Nokia or another big player acquires Emweb ðŸ™‚ But Wt ressembles Qt enought that adapting Qt Creator to Wt would not be a crazy idea. In fact, I wrote a detailed e-mail about it a year ago in the witty-interest mailing list, and it was added to the Wt GSoC ideas page (unfortunately Wt was not selected for GSoC).
I started to develop a plugin for Qt Designer (that’d have become Wt Designer ðŸ˜‰ ) but I hit a problem: given that Wt widgets do not inherit QWidget, you need to write a QWidget wrapper for each WWidget. That’s not really a problem because you can generate that code (it’s what I do). The actual problem is when you want to properly support (show) all the methods, signals, slots and properties of WWidgets, including positioning, etc: you need to write a lot of code for that. Too much code to write for each particular widget, it didn’t feel like the right solution.
So I thought I would take another approach: given that Qt provides QtWebkit, I might be able to add a QWebView to Qt Designer, then place the WWidgets directly (without a QWidget wrapper) on the QWebView canvas. Well, no: given that I would not be adding a full webpage but “chunks”, Qt does not provide a way to (directly) place them. And that’s where I left. It might be possible to do some magic (autogenerating an HTML “dummy” page where to place WWidgets each time a new widget is added/removed?) but I didn’t have time to explore that path.
My wish today: take this idea and make it real.
That being said, I have a Wt application template here that I will commit to KDevelop when I find a moment to properly test it. I hope it will be available in KDevelop 4.3.