查看完整版本: [-- QML --]

QTCN开发网 -> Qt QML开发 -> QML [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

cllssg 2019-04-26 19:32

QML

请教各位大神们:
刚接触QML,在用Canvas进行绘图时,怎么用代码提示补全啊?
   Canvas{        anchors.fill: parent        rotation:parent.m_Angle        onPaint: {            var ctx = getContext("2d")            var lineargradient = ctx.createLinearGradient(0, 0, 150, 150)            lineargradient.addColorStop(0, 'white')            lineargradient.addColorStop(1, 'white')            ctx.beginPath()            ctx.arc(75, 75, 150, 0, Math.PI, true)            ctx.fill()        }    }}就是像上面的,用anchors的时候点上.就有一系列的成员提示,但是用Canvas就没有代码提示了。请知道的大神给解惑一下。

listen342325 2019-04-28 10:52
qtcreator 目前就是这个样子,没法代码提示补全。

songhuirong1 2019-04-28 17:26
我最近也在学QML,发现Canvas确实没法代码补全,写代码都要去帮助文档里拷贝,好费劲啊,希望以后可以改善吧


查看完整版本: [-- QML --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled