rect.color = Qt.rgba(Math.random(), Math.random(), Math.random(), 1);//random返回0~1的随机数 转载于:https://www.cnblogs.com/judes/p/9429880.html