Rectangle渐变背景色

1、代码

import QtQuick 2.0
Rectangle {
    width: 480;
    height: 300;

    //背景色渐变
    gradient: Gradient {
        GradientStop { position: 0.0; color: "#dbddde"; }
        GradientStop { position: 1.0; color: "#5fc9f8"; }
    }
}

 

posted @ 2021-12-19 11:53  朱小勇  阅读(202)  评论(0编辑  收藏  举报