[Development] QAction-like API for QML

André Pönitz andre.poenitz at mathematik.tu-chemnitz.de
Mon Dec 17 02:12:27 CET 2012

On Sun, Dec 16, 2012 at 03:42:59PM -0800, Alan Alpert wrote:
> On Sun, Dec 16, 2012 at 1:12 PM, Bache-Wiig Jens
> <Jens.Bache-Wiig at digia.com> wrote:
> >> If you create the actions in C++, you'd still have to repeat each and
> >> every one in QML, unless we provide a way to iterate over the ones
> >> that should be in a menu, or a toolbar.
> >
> > How about having ToolBar.addAction() for convenience? It is exactly
> > what we do for widgets.
> Widgets is a toolkit for an imperative language. Looping over lists
> and adding things individually is acceptable there. In a declarative
> language it is really not the right way to go.

You make that sound like there was a conceptual difference between
.ui plus C++ on one side, and some json-ish structure plus JS on the
other side.


More information about the Development mailing list