April 09, 2010 by mbm | Comments
As mentioned in previous blog posts, we are currently playing around with ideas for a new widget architecture. While I was in Brazil, I spent some time working with guys at INdT in Recife. We decided to put together a proof-of-concept demo.
QML application using styled components.
The idea behind the project is to take a different approach to UI components and from what we have done in the past.
In Qt today the look-and-feel of a widget is to a large degree implemented in the widget itself, often intertwined with the logic. Styling of widgets is done by forwarding painting calls to QStyle and by requesting hints from the style for certain behavior or property values.
As I wrote in I can haz teh future, plz, we want to separate the UI component data-and-logic from the look-and-feel. This allows us to save the UX designer from having to deal with the messy, complicated and error-prone parts, while at the same time saving the developers from additional pain when said designer changes his or her mind. Win-win. :)
In my presentation at the Bossa'10 Conference I referred to the component's data-and-logic part as "controls", but after a reconsidering, I now refer to them as "models" (as per the MVC design pattern). The component models are implemented as sub-classes of QObject and export their values through properties.
Separating look-and-feel from data-and-logic.
We implement the look-and-feel part of the UI components using QML since this is what it does best.
As part of the proof-of-concept we have also implemented a styling system. The idea is that it builds the component by populating it with a scene-graph consisting of primitives. This gives the style full freedom to decide how the widgets will look and behave.
You can find the repository here. We still keep our discussions on the widgets-ng irc channel and mailing-list. Feel free to join us in our quest for UI snazzyness and general well-being! ;)
Download the latest release here: www.qt.io/download.
Qt 6.8 release focuses on technology trends like spatial computing & XR, complex data visualization in 2D & 3D, and ARM-based development for desktop.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Jan 27, 2025
Qt Gradle Plugin 1.1 (QtGP) is here! If you missed 1.0 release, I..
Jan 23, 2025
There will be plenty of nice additions and improvements available in Qt..
Jan 23, 2025
We have released Qt AI Assistant to help you in cross-platform software..