云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > qml 基本元素运用示例

qml 基本元素运用示例

  • 62 次阅读
  • 3 次下载
  • 2025/5/4 4:02:34

他可以创建很多相似的组件,QML中还有几个例子

Row { Repeater { model: 3 Rectangle {

width: 100; height: 40 border.width: 1 color: \ } } }

68 SystemPalette

具体看效果和文档

Rectangle {

SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } width: 640; height: 480 color: myPalette.window Text {

anchors.fill: parent

text: \; color: myPalette.windowText } }

69. FontLoader

载入一种字体,可以是网络上的,也可以是本地的

Column {

FontLoader { id: fixedFont; name: \ }

FontLoader { id: webFont; source: \ } Text { text: \ font\; font.family: fixedFont.name } Text { text: \ font\; font.family: webFont.name } }

70 LayoutItem 不清楚 71 Scale

对缩放的控制

Rectangle {

width: 100; height: 100 color: \ Rectangle{ x: 50; y: 50;

width: 20; height: 20;

color: \

// 这里是在当前矩形的中间位置沿x轴进行3倍缩放 transform: Scale { origin.x: 10; origin.y: 10; xScale: 3} } }

72 Rotation

Rectangle {

width: 100; height: 100 color: \

// 绕位置25,25 旋转45度

transform: Rotation { origin.x: 25; origin.y: 25; angle: 45} }

73 Translate

Row { Rectangle {

width: 100; height: 100 color: \

// 沿y轴正方向移动20个像素

transform: Translate { y: 20 } }

Rectangle {

width: 100; height: 100 color: \

// 沿y轴负方向移动20个像素 transform: Translate { y: -20 } } }

搜索更多关于: qml 基本元素运用示例 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

他可以创建很多相似的组件,QML中还有几个例子 Row { Repeater { model: 3 Rectangle { width: 100; height: 40 border.width: 1 color: \ } } } 68 SystemPalette 具体看效果和文档 Rectangle { SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } width: 640; height: 480 color: myPalette.window Text { anchors.fill: parent text: \; color: myPalette.windowTex

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com