April 2018
Beginner
714 pages
18h 21m
English
The basic two predefined items in Qt Quick are rectangle and image. You can use them in a variety of creative ways and make them more pleasant-looking by applying GLSL shaders. However, implementing a shader program from scratch is cumbersome and requires in-depth knowledge of the shader language. Luckily, a number of common effects are already implemented and ready to use in the form of the QtGraphicalEffects module.
To add a subtle black shadow to our canvas-based heartbeat element defined in the HeartBeat.qml file, use a code similar to the following that makes use of the DropShadow effect:
import QtQuick 2.9import QtQuick.Window 2.2import QtGraphicalEffects 1.0Window { //... HeartBeat { id: heartBeat anchors.centerIn: ...Read now
Unlock full access