Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
9 January 2020
We have already seen how to make colored rectangles: just write something like "color: "red"" in your QML code. Is that all that Qt Quick offers in terms of colors? Well, not quite. This video shows you how to specify colors in different ways (e.g. by an HTML hex-string, or by specifying RGB channels using normalized floating point) and create gradients in Qt Quick.
Don't underestimate these little graphical touches; they can truly make the difference between a good looking application and a great looking application.
Dithering and banding of gradients is also discussed. If you want to know more about those topics, check out these articles on Wikipedia: https://en.wikipedia.org/wiki/Dither and https://en.wikipedia.org/wiki/Colour_banding
You can find the mentioned video about "FocusScope" here: • Introduction to Qt / QML (Part 22) - Focus...
The example code showcased in this video is available here: https://github.com/KDAB/kdabtv
00:00 Introduction
00:42 Colors
01:59 Gradients
05:29 Gradient Images
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Upgrade your applications from Qt 5 to Qt 6 with KDAB’s migration services. Get a free migration assessment and join a hands-on workshop to prepare your team for a successful transition!
Learn more