Smart UI development with QML and Qt Quick: lessons learned & best practices

Marco Piccolino

QML’s power of expression is a double-edged sword. The language provides little to no constraints regarding various choices, including component boundaries, nesting depth of elements, property-binding policies, data storage and statefulness patterns. In my experience, this limited prescriptiveness seems to speed up development at the beginning, but it does in fact slow it down when it comes to modularisation of the code, addition of new features and iterative development-testing loops. Hands-on experience and commitment, however, let you discover development practices that can give you a smoother ride.

Whether you are a complete beginner or someone who already had their own share of QML joys and pains, I got you covered with some useful ideas and best practices to reduce the pain and increase the joy. Since QML is mainly used for UIs, and since UI development poses specific challenges, we will mainly focus on Qt Quick UI development. Many of the tips, however, are applicable to all kinds of modules that expose a QML API.

Topics covered include:

  • keeping the UI always testable, independently of any data source and business logic;
  • developing components that can be inspected in qmlscene at any time;
  • defining clear contact points between the UI and logic layers;
  • thinking responsive from the beginning;
  • refactoring and adding features with little friction.

If you also have some tips & tricks, share them with the audience in the discussion after the talk.

track icon Dante
duration icon 60 min
language icon English