qml
齐_天_大_圣
格物穷理
展开
-
qml 输入
TTextEdit.qml// TTextEdit.qmlimport QtQuick 2.0FocusScope { width: 96; height: 96 Rectangle { anchors.fill: parent color: "lightsteelblue" border.color: "gray" } property alias text: input.text property alias.原创 2021-03-21 15:17:48 · 222 阅读 · 0 评论 -
qml 定位
BlueSquare.qmlimport QtQuick 2.0Item { id:root width: 48 height: 48 property alias text: label.text Rectangle{ width: parent.width height: parent.height color: "#87CEFA" Text { anchors.cen.原创 2021-03-21 14:18:28 · 190 阅读 · 0 评论 -
qml 学习资料
在线qml book:https://www.bookstack.cn/read/QmlBook-In-Chinese/README.md原创 2021-03-21 13:32:18 · 128 阅读 · 0 评论 -
qml 布局
简述Column:列对齐Row: 行对齐Grid: 栅格Flow: 流Square.qmlimport QtQuick 2.0Rectangle{ width: 48 height: 48 border.color: Qt.lighter(color) property alias text: label.text Text { id: label text: qsTr("text") anchors原创 2021-03-21 12:58:15 · 205 阅读 · 0 评论 -
qml 简单的转换
简述组件:ClickableImage.qml旋转:rotation比例:scale平滑:smoothClickableImage.qmlimport QtQuick 2.0Image { id: root signal clicked MouseArea{ anchors.fill: parent onClicked: root.clicked() }}transformations.qmlimport QtQu原创 2021-03-21 10:45:52 · 106 阅读 · 0 评论 -
qml 组件
组件自定义一个button。注意:组件Button.qml文件名要大写开头,不然调用不了。不知道为什么//Button.qmlimport QtQuick 2.0Item{ id:root signal clicked width: 116 height: 26 Rectangle { id: rect anchors.fill: parent //alias(别名)功能,它可以将内部嵌套的QML元素的属性原创 2021-03-21 00:09:14 · 107 阅读 · 0 评论 -
qml 基本元素
文章目录Item矩形渐变⾊文本元素图像⿏标区域元素(MouseArea Element)ItemItem(基本元素对象)通常被⽤来作为其它元素的容器使⽤,类似HTML语 ⾔中的div元素(div element)。矩形 Rectangle{ id:rect width: 800 height: 400 color: "slategray" }渐变⾊ Rectangle{ id:rect原创 2021-03-20 23:46:47 · 203 阅读 · 0 评论 -
qml demo1
代码import QtQuick 2.12import QtGraphicalEffects 1.0Image { id: root source: "images/background.png" property int blurRadius: 0 Image { id: pole source: "images/pole.png" anchors.horizontalCenter: parent.horizont.原创 2021-03-20 17:33:45 · 88 阅读 · 0 评论