July 05, 2017 by Thomas Hartmann | Comments
With Qt Creator 4.3 released a month ago, coming with cool new features for Qt Quick Designer, we decided it is time to create an example that shows the complete intended workflow for Qt Quick Designer and establishes good practices.
We implemented the UI of a Coffee Machine following the reference design of a professional designer. The designer also provided all graphical assets as PNG images. In the screenshot, you can see the Resource Browser containing all the provided graphical assets. You can use these graphical assets by drag and drop.
The example is the UI of a coffee machine.
The emphasis for this example lies in a clean separation between imperative logic and the purely declarative visual design which improves the collaboration between designers and front-end developers. The separation between the declarative UI and the implementation allows us to create the visual UI using just Qt Quick Designer, while ensuring that the final result is matching the original design.
This way Qt Quick and Qt Quick Designer will maximize productivity and maintainability.
We created a video that gives an overview of the workflow and the structure of the example. Starting with a reference video from the original designer, we model the different screens using states and QML components. Each screen can be created directly in the Qt Quick Designer following the original reference design.
https://www.youtube.com/watch?v=Ko3YPM_tStM&feature=youtu.be
As seen in the video, in the property tabs you can bind properties to JavaScript expressions which allows to model behavior in a convenient way. For example we have the sliders which adjust the different coffee ingredients levels and then we bind the anchor margins of the graphical elements to JavaScript expressions.
We can define expressions controlling the active states, based on when conditions.
The animations and application logic are implemented in a single QML file. We use alias properties to define an interface between individual screens and components. Maintaining and integrating changes to the UI becomes a lot easier this way.
The source code of the example can be found in the Qt examples repository.
Contact us to learn more and discuss your needs in more detail.
Download the latest release here: www.qt.io/download.
Qt 6.5 is the latest Long-Term-Support release with all you need for C++ cross-platform app development.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Sep 5, 2023
We are happy to announce the release of the Qt Visual Studio Tools version..
Aug 31, 2023
As is customary Apple announced their latest operating system versions..
Aug 31, 2023
We have released Qt 5.15.15 LTS for subscription license holders today. As..
Qt Group includes The Qt Company Oy and its global subsidiaries and affiliates.