How to make a gradient effect in the header background?

How to make a gradient effect in the header background?

This can be done using code:

import QtQuick 2.5
import QtGraphicalEffects 1.0

    Item {
        Component.onCompleted: p_userQml.z = -1
        LinearGradient {
            anchors.fill: parent
            gradient: Gradient {
                GradientStop { position: 0.0; color: "white" }
                GradientStop { position: 1.0; color: "black" }
            }
        }
    } 

See the example custom_gradient.pma (965.0 KB)

Read more about linear gradient http://doc.qt.io/qt-5/qml-qtgraphicaleffects-lineargradient.html and radial gradient http://doc.qt.io/qt-5/qml-qtgraphicaleffects-radialgradient.html


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.