April Fools’ passed, it’s safe to blog again 🙂
My last wish was born when Koen Deforche (one of the best software developers I know) made an innocent comment at my talk at FOSDEM talk this year.
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.
In addition to the Wt Designer stuff, it would also be very nice to have a Wt Linguist based on Qt Linguist. This was recently asked in the mailing list.
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.
Why don’t you commit it to KAppTemplate? Templates within KDevelop only make sense if they are related to a specific KDevelop-plugin, I think.
Why don’t design in default qt designer with self-limited amount of widgets and then just ‘sed’ ui file/resulting file using correspondence map (QWidget -> WWidget, QPushButton -> WPushButton, etc) ?
So, did you made something new?
I wish this too!
Five years later, I have made your wish come true, I am sharing the tool I developed to help me make Wt applications. It is a WYSIWYG designer pretty much like QtDesigner but tailored specially for Wt. At the moment I only supply Windows binaries, but will work on the Linux and Mac binaries soon.
Any feedback is well appreciated.
IMPORTANT for when installing in Windows:
1) If complains about missing a DLL, install the VS2013 redistributables included in the installer.
2) Let the application through the firewall, otherwise you will not see anything.
Hope it is helpful: