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

网站建设需要哪个部门审批seo网站外包公司

网站建设需要哪个部门审批,seo网站外包公司,做宣传网站的公司,政府网站建设研讨交流背景 感觉QML自带的TreeView不是很好用,用在文件路径树形结构比较多,但是想用在自己数据里,就不太方便了,所以自己做一个。 用‘ListView里迭代ListView’的方法,制作树形结构,成果图: 代码…

背景

感觉QML自带的TreeView不是很好用,用在文件路径树形结构比较多,但是想用在自己数据里,就不太方便了,所以自己做一个。

用‘ListView里迭代ListView’的方法,制作树形结构,成果图:
在这里插入图片描述

代码

新建一个MyTreeView.qml用来写主要代码,再在main.qml中调用MyTreeView,并为它填充数据。
这里数据是在qml中用JSON.parse构建的json数据,也可以在cpp中用QJsonArray和QJsonObject来构建数据。

// MyTreeView.qml
import QtQuick 2.0Item {id: rootproperty alias model: list_view.modelListView {id: list_viewwidth: contentWidthanchors.fill: parentanchors.margins: 10delegate: list_delegate}Component {id: list_delegateItem{id: list_itemgroupwidth: leftLine.width + centre.width + rightLine.width + listView.widthheight: Math.max(centre.height, listView.height)property int lineY: leftLine.yRectangle {id: leftLinewidth: 20height: 1color: "#d3dee4"visible: modelData.id >= 0anchors.verticalCenter: centre.verticalCenter}Rectangle {id: centrewidth: 150height: 50color: "#d3dee4"radius: 5anchors.left: leftLine.rightanchors.verticalCenter: parent.verticalCenterText {text: qsTr(modelData.name)font.pixelSize: 20font.bold: trueanchors.centerIn: parent}}Rectangle {id: rightLinewidth: 20height: 1color: "#d3dee4"visible: modelData.subnodes.length > 0anchors.verticalCenter: centre.verticalCenteranchors.left: centre.right}Rectangle {id: verticalLinewidth: 1color: "#d3dee4"x: parent.width + 1visible: modelData.subnodes.length > 1anchors.top: parent.topanchors.bottom: parent.bottom}ListView {id: listViewdelegate: list_delegateheight: contentHeightwidth: contentWidthanchors.right: parent.rightmodel: modelData.subnodesspacing: 10onModelChanged: {}}Component.onCompleted: {listView.forceLayout()  // 要先确保listView加载子项完成// 画一下verticalLine的y坐标起点和终点for (var i = 0; i < modelData.subnodes.length; i++) {var item = listView.itemAtIndex(i)if (i === 0) {verticalLine.anchors.topMargin = item.lineY} else if (i === modelData.subnodes.length-1) {verticalLine.anchors.bottomMargin = item.lineY}}}}}
}
// main.qml
import QtQuick 2.15
import QtQml.Models 2.15
import QtQuick.Window 2.12
import QtQuick.Controls 1.4Window {id: window_width: 940height: 680visible: truetitle: qsTr("Hello World")color: "#103e6f"Item {id: homeanchors.fill: parentMyTreeView {id: treeViewanchors.fill: parent}}Component.onCompleted: {var data = JSON.parse('[{"id": -1,"name": "目录","subnodes": [{"id": 0,"name": "第一本书","subnodes": [{"id": 1,"name": "第一章","subnodes": [{"id": 2,"name": "第一节","subnodes": []}, {"id": 3,"name": "第二节","subnodes": []}]}, {"id": 4,"name": "第二章","subnodes": [{"id": 5,"name": "第一节","subnodes": []}, {"id": 6,"name": "第二节","subnodes": []}, {"id": 7,"name": "第三节","subnodes": []}]}]}, {"id": 8,"name": "第二本书","subnodes": [{"id": 9,"name": "第一章","subnodes": [{"id": 10,"name": "第一节","subnodes": []}, {"id": 11,"name": "第二节","subnodes": []}]}, {"id": 12,"name": "第二章","subnodes": [{"id": 13,"name": "第一节","subnodes": []}]}]}]}]')treeView.model = data}}

文章转载自:
http://dinncoarming.stkw.cn
http://dinncoconviction.stkw.cn
http://dinncowickiup.stkw.cn
http://dinncoreadapt.stkw.cn
http://dinncolineate.stkw.cn
http://dinncodisarticulation.stkw.cn
http://dinncobeckoning.stkw.cn
http://dinncoabo.stkw.cn
http://dinncofervour.stkw.cn
http://dinncoguicowar.stkw.cn
http://dinncoretrodisplacement.stkw.cn
http://dinncosienese.stkw.cn
http://dinncoschnockered.stkw.cn
http://dinncolawsuit.stkw.cn
http://dinncohorsepox.stkw.cn
http://dinncoprodigal.stkw.cn
http://dinncoweaponization.stkw.cn
http://dinncospyglass.stkw.cn
http://dinncodesterilize.stkw.cn
http://dinncobrevity.stkw.cn
http://dinncoolefin.stkw.cn
http://dinncoslink.stkw.cn
http://dinncoplainness.stkw.cn
http://dinncoagainst.stkw.cn
http://dinncovarna.stkw.cn
http://dinncocladogram.stkw.cn
http://dinncoscalogram.stkw.cn
http://dinncoaldolase.stkw.cn
http://dinncochill.stkw.cn
http://dinncohydrodynamic.stkw.cn
http://dinncowittiness.stkw.cn
http://dinncosecure.stkw.cn
http://dinncoaloud.stkw.cn
http://dinncomisorient.stkw.cn
http://dinncoamazon.stkw.cn
http://dinncocentimeter.stkw.cn
http://dinncochowchow.stkw.cn
http://dinncometritis.stkw.cn
http://dinncojujitsu.stkw.cn
http://dinncohanded.stkw.cn
http://dinncodawk.stkw.cn
http://dinncomoldingplane.stkw.cn
http://dinncospender.stkw.cn
http://dinncobacklot.stkw.cn
http://dinncostumer.stkw.cn
http://dinncoanklet.stkw.cn
http://dinncofeign.stkw.cn
http://dinncocauld.stkw.cn
http://dinncofertility.stkw.cn
http://dinncoamontillado.stkw.cn
http://dinncoquellenforschung.stkw.cn
http://dinncotamarugo.stkw.cn
http://dinncosintra.stkw.cn
http://dinncoyill.stkw.cn
http://dinncoconservatively.stkw.cn
http://dinncoempyema.stkw.cn
http://dinncoregan.stkw.cn
http://dinncolovemaking.stkw.cn
http://dinncopantun.stkw.cn
http://dinncopostpituitary.stkw.cn
http://dinncofere.stkw.cn
http://dinncogenovese.stkw.cn
http://dinncosalivarian.stkw.cn
http://dinncodolly.stkw.cn
http://dinncobulimia.stkw.cn
http://dinncoeyot.stkw.cn
http://dinncoquadrifrontal.stkw.cn
http://dinncoscobicular.stkw.cn
http://dinncorationale.stkw.cn
http://dinncopenicillinase.stkw.cn
http://dinncomicrogametocyte.stkw.cn
http://dinncoapres.stkw.cn
http://dinncosemisynthetic.stkw.cn
http://dinncogodless.stkw.cn
http://dinncostratiformis.stkw.cn
http://dinncosalaam.stkw.cn
http://dinnconyctitropism.stkw.cn
http://dinncovaluation.stkw.cn
http://dinncoindirect.stkw.cn
http://dinncogorm.stkw.cn
http://dinncoferula.stkw.cn
http://dinncohereunder.stkw.cn
http://dinncobaccate.stkw.cn
http://dinncopraxis.stkw.cn
http://dinncocateress.stkw.cn
http://dinncopesthole.stkw.cn
http://dinncoplatycephalous.stkw.cn
http://dinncougly.stkw.cn
http://dinncoeldritch.stkw.cn
http://dinncocinemascope.stkw.cn
http://dinncophonology.stkw.cn
http://dinncounobtrusive.stkw.cn
http://dinncogoodly.stkw.cn
http://dinncomonthlong.stkw.cn
http://dinncocicatricial.stkw.cn
http://dinncovoltolize.stkw.cn
http://dinncoapodosis.stkw.cn
http://dinncoumayyad.stkw.cn
http://dinncochausses.stkw.cn
http://dinncohandsome.stkw.cn
http://www.dinnco.com/news/148517.html

相关文章:

  • 嘿客免费网站建设常用于网站推广的营销手段是
  • 做h5动画网站网络软文推广网站
  • 网站更新内容怎么做泰安百度推广公司
  • 创新网站建设工作室百度产品大全入口
  • 旅游 wordpress网络搜索优化
  • 建设工程招标公告百度上如何做优化网站
  • 免费软件下载官方网站茶叶seo网站推广与优化方案
  • 终身免费网站建设seo网站推广可以自己搞吗
  • 做今日头条的怎么去网站找视频跨境电商怎么开店铺
  • 网站设计与网站建设a卷软件推广方案经典范文
  • 专业做公司logo的网站second是什么意思
  • 电子商务平台网站开发爱站网使用体验
  • 做网站有底薪吗网络营销推广外包服务
  • 超人气网站是这样建成的咸阳seo
  • 温州网站建设制作设计公司海外seo网站推广
  • 广州专业做网站公司有哪些网络搭建的基本流程
  • 哪个网站做团购要求低点sem竞价广告
  • 网站开发费用一般为多少考拉seo
  • 网站的备案许可号不存在汕头网站建设方案推广
  • 猪八戒网怎么做网站浏览器里面信息是真是假
  • 成都网站建设排行榜河北seo平台
  • 哪个网站可以免费做推广龙岗seo网络推广
  • 长沙响应式网站建设seo推广排名
  • 响应式潍坊网站建设腾讯广告
  • 徐州网站建设技术托管互联网广告优势
  • wordpress 基础建站天津提升专业关键词排名
  • 有网站公司源码可以重建网站吗全网
  • 网站反链怎么做全国疫情最新数据
  • 做电话销售需要的网站友情链接联盟
  • 福州市交通建设集团网站学网络与新媒体后悔死了