zhengtianzuo |
2017-12-09 16:01 |
zhengtianzuo系列-Qml选择颜色对话框
使用Qt.labs.platform 1.0中的ColorDialog 代码非常的简单
``` ApplicationWindow { id: root visible: true width: 400 height: 300 title: qsTr("Qml选择颜色对话框") color: colorDialog.color
Button{ text: qsTr("选择颜色") height: 48 width: 120 anchors.centerIn: parent MouseArea{ anchors.fill: parent onClicked: { colorDialog.open(); } } }
ColorDialog { id: colorDialog title: qsTr("选择颜色") color: "#AAAAAA" } } ```
需要完整代码请访问 QtQuickExamples |
|