Skip to main content

QtWS15- Lightning Talk, A new way for creating QML models from C++, Thomas Boutroue

Qt World Summit 2015, OCTOBER 5-7, BERLIN, GERMANY A new way for creating QML models from C++: While creating QML apps over the years, Thomas noticed that ListModel { } was too much limited, and that reimplementing tons of QAbstractListModels in C++ was painful, and thus lots of people (including me) were tempted to use non-model ways to do it (QList of objects or variants, QQmlListProperty, JS arrays etc…). So he finally created a template+metaobject based class that can create any model in just 1 single line of C++. It has been widely used in several projects, and now it’s quite mature. Thomas will discuss about further additions/optimizations, and about the interest of a possible integration in mainstream QML module.