Fast C++ to QML properties

December 1, 2019

Qt Quick is becoming the de-facto choice on mobile and embedded platforms. It is also widely spread in automotive and simulation software. We use Qt Quick for simulating jet planes cockpit with full indication where typical on-screen action involves up to thousands of parameters changing simultaneously. The primary language of Qt Quick is QML, which is extremely popular amongst developers and designers. It allows quick prototyping, fast development cycles, platform independence, live updates (REPL), and even more. One of the foundation pillars of QML is its property-based expressions. Properties can be seen here and there gluing UI parts together, powering UI logic, binding to each other, appearing as variables in JS code. Less often, properties serve as interlanguage communication. Properties can be stated as a bidirectional universal C++-QML (not only C++) key-value data interface accessible throughout the UI. Named packs of properties are called property maps with the vanilla exemplar named QQmlPropertyMap, which “provides a convenient way to expose domain data to the UI layer” (Qt Docs). Leveraging property maps greatly reduce the need for the C++ data layers, which can lead to more robust, maintainable, extensible products. On the other side is QQmlPropertyMap poor performance on insertion and updating operations allows no more than a few hundred properties online on desktop-class hardware. In this talk, we discuss some alternatives to QQmlPropertyMap, their trade-offs, and limits. Finally, we come to FastProperyMap which is by in order of magnitude more performant on both insertion and updates, making it suitable even for embedded devices. The audience is expected to be familiar with the Qt Meta-Object system, but no in-depth knowledge is required.

TALK: Fast C++ to QML Properties

SPEAKER: Simon Davydov


TRACK: Qt & Technical Deep Dive

Talk recorded at the Qt World Summit 2019 event in Berlin. #QtWS19 November 2019 - BCC 

Previous Video
Can you use Qt without moc?
Can you use Qt without moc?

Verdigris - Using Qt Without moc -- Olivier Goffart -- Woboq

Next Video
Accelerate your Qt Development with Ubuntu Core and Snaps
Accelerate your Qt Development with Ubuntu Core and Snaps

The Future is Written With Qt - Accelerated Development Model With Ubuntu Core and Snaps -- Igor Ljubuncic ...

Convince your boss: 10 ways to make them say "Yes!"

Get Presentation