使用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
联系方式:
作者 | 郑天佐 |
---|---|
278969898 | |
主页 | http://www.camelstudio.cn |
邮箱 | camelsoft@163.com |
博客 | http://blog.csdn.net/zhengtianzuo06 |
github | https://github.com/zhengtianzuo |
QQ群 | 199672080 |