当前位置: 首页 > news >正文

网站快速排名优化报价学网站建设培训机构

网站快速排名优化报价,学网站建设培训机构,ppt模板免费下载完整版免费无需会员,广东网站建设找哪家目录 定位元素 Column Row Grid Flow 布局元素 1.元素填充它的⽗元素。 2.对齐 定位元素 Column Column (列)元素将它的⼦对象通过顶部对⻬的列⽅式进⾏排列。 spacing 属性⽤来设置每个元素之间的间隔⼤⼩ Row Row (⾏)元…

 

目录

 

定位元素

 Column

Row

Grid

Flow

布局元素

1.元素填充它的⽗元素。

2.对齐


定位元素

 Column

Column (列)元素将它的⼦对象通过顶部对⻬的列⽅式进⾏排列。 spacing
属性⽤来设置每个元素之间的间隔⼤⼩

Row

Row (⾏)元素将它的⼦对象从左到右,或者从右到左依次排列,排列⽅式
取决于 layoutDirection 属性。 spacing 属性⽤来设置每个元素之间的间隔⼤
⼩。

 

Window {width: 640height: 480visible: truetitle: qsTr("Hello World")color: "black"//Column{Row{layoutDirection: Qt.RightToLeftanchors.centerIn: parentspacing: 10padding: 10MyPushbutton{color:"red"width:60height: 70buttontext: "1"}MyPushbutton{id:blueButtoncolor:"blue"width:60height: 70buttontext: "2"}MyPushbutton{id:greenButtoncolor:"green"width:60height: 70buttontext: "3"}populate: Transition {// 定义动画效果NumberAnimation {property: "opacity";from: 0;to: 1;duration: 3000}}move: Transition {NumberAnimation { properties: "x,y"; duration: 2000 }}add:Transition {NumberAnimation{ properties: "width";from:30;to:120;duration: 2000}}focus: trueKeys.onSpacePressed: blueButton.visible = !blueButton.visible}
}

Grid

Grid (栅格)元素通过设置 rows (⾏数)和 columns (列数)将⼦对象排列
在⼀个栅格中。可以只限制⾏数或者列数。如果没有设置它们中的任意⼀
个,栅格元素会⾃动计算⼦项⺫总数来获得配置,例如,设置 rows (⾏数)
3 ,添加了 6 个⼦项⺫到元素中,那么会⾃动计算 columns (列数)为 2 。属
flow (流)与 layoutDirection (布局⽅向)⽤来控制⼦元素的加⼊顺序。
spacing 属性⽤来控制所有元素之间的间隔

 

Grid{rows:2columns:3spacing:10horizontalItemAlignment: Grid.AlignHCenterverticalItemAlignment: Grid.AlignVCenteranchors.centerIn: parentMyPushbutton{color:"red"width:40height: 70buttontext: "1"}MyPushbutton{color:"green"width:20height: 30buttontext: "2"}MyPushbutton{color:"blue"width:10height: 20buttontext: "3"}MyPushbutton{color:"#ED42DD"width:60height: 70buttontext: "4"}MyPushbutton{color:"#2DD630"width:60height: 70buttontext: "5"}MyPushbutton{color:"#CED64C"width:60height: 70buttontext: "6"}}

Flow

Flow (流)。通过 flow (流)属性和 layoutDirection (布局
⽅向)属性来控制流的⽅向。它能够从头到底的横向布局,也可以从左到右
或者从右到左进⾏布局。作为加⼊流中的⼦对象,它们在需要时可以被包装
成新的⾏或者列。为了让⼀个流可以⼯作,必须指定⼀个宽度或者⾼度,可
以通过属性直接设定,或者通过 anchor (锚定)布局设置

 

Flow{spacing:10layoutDirection:Flow.BottomRightanchors.centerIn: parentMyPushbutton{color:"red"width:40height: 70buttontext: "1"}MyPushbutton{color:"green"width:20height: 30buttontext: "2"}MyPushbutton{color:"blue"width:10height: 20buttontext: "3"}MyPushbutton{color:"#ED42DD"width:60height: 70buttontext: "4"}MyPushbutton{color:"#2DD630"width:60height: 70buttontext: "5"}MyPushbutton{color:"#CED64C"width:60height: 70buttontext: "6"}}

布局元素

QML 使⽤ anchors (锚)对元素进⾏布局。 anchoring (锚定)是基础元素对象的基本属性,⼀个元素有 6 条锚定线( top 顶, bottom 底, left 左, right 右, horizontalCenter⽔平中,verticalCenter垂直中)。 在 QML 中,锚也会冲突的,比如:anchors.centerInanchors.left 是两个不同的锚点属性,它们不能同时生效。

 

1.元素填充它的⽗元素。

这里填充需要注意如果三个元素(A/B/C)分别包含的意思,且B包含C,这里B跟A会填充,如果C没跟B绑定,就会导致C如下效果

 

 这里MyPushbutton里Text被

Window {width: 640height: 480visible: truetitle: qsTr("Hello World")color: "white"Rectangle{color:"#CED64C"width:60height: 70// anchors.fill: parentanchors.centerIn: parentText {id: textanchors.centerIn: parentfont.pointSize: 24text: qsTr("1")}}
}

2.对齐

这里只写left和horizontalCenter其他类似

Rectangle{color:"#CED64C"width:60height: 70y:20anchors.left: parent.left//anchors.horizontalCenter: parent.horizontalCenter  // 调整水平位置//anchors.horizontalCenterOffset: -30 //偏移//anchors.verticalCenterOffset: -parent.height / 2 + height / 2  // 调整垂直位置Text {id: text02anchors.centerIn: parentfont.pointSize: 24text: qsTr("2")}}

 

 

http://www.dtcms.com/a/535298.html

相关文章:

  • 做网站要提供营业执照吗国家工商官网查询
  • 代刷网站推广全网最便宜wordpress 拼团插件
  • 电子商务网站建设视频app推广项目从哪接一手
  • 延吉网站开发云开发数据库
  • 如何做网站的外链建设工程部网站
  • 做百度网站需要钱吗网站流量超限什么意思
  • 制作网站的固定成本西安seo网站公司
  • 网站推广的基本方法是海淀区seo搜索优化
  • 华为网站哪个公司做的百度网址收录入口
  • 俄罗斯在线 网站制作哈尔滨网站建设乙薇
  • 手机购物网站 设计竟标网站源码
  • 网站搭建 成都苏州吴中区保洁公司
  • 企业网站seo营销网页无法访问怎么解决
  • PHP网站开发与管理设计心得做网站要懂什么编程
  • 深圳网站建设推广优化seo依安县建设网站
  • 网站开发 如何备案网站安全证书过期怎么处理
  • 垂直类门户网站wordpress提速插件
  • 西宁市网站建设高端关于网站建设的调研报告
  • 新闻写作网站dw网站开发流程
  • 东莞做网站卓诚东莞企业网站制
  • 哪些是大型网站wordpress农业站模板
  • 做图片类型的网站要怎么做wordpress中注册功能
  • 蓝色科技企业网站模板免费下载互联网网站样式
  • 网站开发内容包括哪些wordpress 同步文章
  • 如何用wampp 做网站珠宝网站模版
  • 网站描述在关键字前可以吗装修图片效果图 现代简约
  • 域名怎么制作网站服务器网站建设流程图
  • 建站管理过程北京网站关键词排名
  • python 做网站 套件酒店网页设计模板图片
  • 做网站的公司深圳成都营销型网站建设熊掌号