QML写的无边框ai图形圆角按比例缩放界面窗口缩放时闪烁严重,求助

QML 实现圆角图片
[问题点数:40分]
QML 实现圆角图片
[问题点数:40分]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。QML写的无边框圆角界面窗口缩放时闪烁严重,求助~~
[问题点数:40分,结帖人wo9aishuai]
QML写的无边框圆角界面窗口缩放时闪烁严重,求助~~
[问题点数:40分,结帖人wo9aishuai]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。QML写的无边框圆角界面窗口缩放时闪烁严重,求助~~
23:01:20&&&来源:&&&评论: 点击:
使用QML写了个UI,无边框圆角,菜单栏使用Canvas贴的圆角图片,自己写了个可以缩放的边框,但是在使用鼠标进行拖拽缩放时候,窗口闪烁,请教怎样处理才能不闪烁啊。。。。
菜单贴图代码:
&&&&&&&&anchors.fill:&parent
&&&&&&&&contextType:&"2d";
&&&&&&&&property&string&menuBak:&"images/icons/menuBak.png";
&&&&&&&&onPaint:&{
&&&&&&&&&&&&context.lineWidth=4;
&&&&&&&&&&&&context.strokeStyle="#494444";
&&&&&&&&&&&&context.reset();
&&&&&&&&&&&&context.beginPath();
&&&&&&&&&&&&context.moveTo(0,parent.height);
&&&&&&&&&&&&context.lineTo(0,10);
&&&&&&&&&&&&context.arc(10,10,10,Math.PI,Math.PI*3/2,false);
&&&&&&&&&&&&context.lineTo(parent.width-10,0);
&&&&&&&&&&&&context.arc(parent.width-10,10,10,Math.PI*3/2,0,false);
&&&&&&&&&&&&context.lineTo(parent.width,parent.height);
&&&&&&&&&&&&context.clip();
&&&&&&&&&&&&context.drawImage(menuBak,0,0,parent.width,parent.height);
&&&&&&&&&&&&context.stroke();
&&&&&&&&&&&&context.restore();
&&&&&&&&Component.onCompleted:&loadImage(menuBak);
&&&&&&&&onImageLoaded:&requestPaint();
边框拖拽缩放代码,只贴一个方向,其他方向类似:
MouseArea&{
&&&&&&&&id:&topLeft
&&&&&&&&cursorShape:&Qt.SizeFDiagC
&&&&&&&&height:&8
&&&&&&&&width:&8
&&&&&&&&anchors.left:&parent.left
&&&&&&&&anchors.leftMargin:&0
&&&&&&&&anchors.top:&parent.top
&&&&&&&&anchors.topMargin:&0
&&&&&&&&onPressed:&{
&&&&&&&&&&&&clickPos&=&Qt.point(mouse.x,mouse.y);
&&&&&&&&onPositionChanged:&{
&&&&&&&&&&&&var&delta&=&Qt.point(mouse.x-clickPos.x,mouse.y-clickPos.y);
&&&&&&&&&&&&mainwindow.setX(mainwindow.x+delta.x);
&&&&&&&&&&&&mainwindow.setY(mainwindow.y+delta.y);
&&&&&&&&&&&&mainwindow.setWidth(mainwindow.width-delta.x);
&&&&&&&&&&&&mainwindow.setHeight(mainwindow.height-delta.y);
相关热词搜索:
频道总排行
频道本月排行 上传我的文档
 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
正在努力加载中...
下载积分:1352
内容提示:cad快捷键,cad,快捷键
文档格式:DOC|
浏览次数:0|
上传日期: 05:24:40|
文档星级:
该用户还上传了这些文档
官方公共微信

我要回帖

更多关于 qml 闪烁 的文章

 

随机推荐