[Qt-interest] C++ or QML

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Thu Jul 1 12:36:03 CEST 2010


BRM wrote on Thursday, July 01, 2010 1:27 AM:

> I agree for cross-platform applications; but it's more unrealistic to
> expect Nokia/Qt to provide something that 99.999% of their users
> won't use. 

I have to backup here Ben, too, and not just because of "economic views". And I am talking now about QtCore and QtGui only: these modules should remain to only consists of *basic building blocks* for applications, that means: if your requirement is to rebuild/mimic the behaviour of some random application like Excel, then you have all the building blocks you need! If necessary you'll have to dive deep down and invent your own custom widget, but everything is possible, thanks to a lean API and clear documentation! And that is what is so great about Qt.

And the fact that you were able to do so proves my statement. And how long did it take you? Months? A year maybe? How long did it take MS to come up with that table? I guess much longer I guess - so Qt was already a huge help for you (hopefully) ;)

Now off course there is the question: "what is to be considered a 'basic building block'?" Certainly we agree on push buttons, combo boxes etc., as nowadays they mostly behave the same on all OS/window managers out there (and Qt elegantly bridges the differences). Excel sheets? Well, certainly I agree that this is not just a "random widget". Lots of people - especially those who gave you those requirements, I guess ;) - are using Excel.

But the question should always remain: how "generic" is such a widget? How re-usable is it? Certainly with a simple combobox you can create all sorts of other dialogs, widgets etc., no doubt. And Qt already has a QTableView/Widget, so why not make it "behave like Excel"? Because then you would follow some random decisions some company has made, maybe tomorrow the new fancy widget would become from some fruit company etc. So yes, the line between "generic" and "custom" widgets is hard to draw, I agree.


That said, nothing prevents someone (3rd party, Nokia) to come up with a QSuperWidgets module, or sell single Designer widget plugins (apparently no one has come up with an Excel widget clone yet, so that could be a market for your solution ;)

So: keep QtGui (and all other "core" modules) as clean as possible, don't "polute" them with "ready-to-use-and-do-everything" widgets/components. The existing components should be as easy to extend as possible, and that is only possible if they are as lean as possible (not overloaded with specific funtionality).

I still consider Qt a "basic building block" which offers you functionality which would otherwise be system-dependent (threads, sockets, windows, widgets, ...), and your investment into your own application is to make these building blocks work as expected (e.g. as an Excel sheet). If that costs you lots of work, then, well, it is because it also cost MS a lot of work (even more, because they did not use Qt ;) And if your "stakeholders" tell you that this is too expensive, then you can always embed "the real thing", thanks to ActiveQt.


Improve the existing API by removing (possible) redundancies instead - and add other stuff "on top" of that (e.g. the upcoming QML module, as to go on-topic again ;) That is my wish for the future Qt development. And I can't stop myself from quoting my professor here: "Keep it as simple as possible, but not simpler" (he stole that quote from someone else, too, so I can't be sued ;)


Cheers, Oliver 
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list