qt模拟CSS3之box-shadow效果

上传者: lihancheng | 上传时间: 2021-08-26 16:19:41 | 文件大小: 776KB | 文件类型: RAR
由于qss不支持css3的box-shadow效果,故而该工程中,采用类似android九点图的方式,把背景图截为9分,即4角4边一中心,并把4角4边重绘于待修饰的控件的边缘,从而模拟了box-shadow效果。

文件下载

资源详情

[{"title":"( 48 个子文件 776KB ) qt模拟CSS3之box-shadow效果","children":[{"title":"QssDemo","children":[{"title":"QssDemo.pro <span style='color:#111;'> 479B </span>","children":null,"spread":false},{"title":"res.qrc <span style='color:#111;'> 1.79KB </span>","children":null,"spread":false},{"title":"QMenu","children":[{"title":"radiobutton_unchecked.png <span style='color:#111;'> 240B </span>","children":null,"spread":false},{"title":"checkbox_unchecked_hover.png <span style='color:#111;'> 159B </span>","children":null,"spread":false},{"title":"QMenu.css <span style='color:#111;'> 239B </span>","children":null,"spread":false},{"title":"radiobutton_checked.png <span style='color:#111;'> 355B </span>","children":null,"spread":false},{"title":"radiobutton_checked_hover.png <span style='color:#111;'> 532B </span>","children":null,"spread":false},{"title":"checkbox_checked.png <span style='color:#111;'> 263B </span>","children":null,"spread":false},{"title":"checkbox_checked_hover.png <span style='color:#111;'> 266B </span>","children":null,"spread":false},{"title":"radiobutton_unchecked_hover.png <span style='color:#111;'> 492B </span>","children":null,"spread":false},{"title":"checkbox_unchecked.png <span style='color:#111;'> 159B </span>","children":null,"spread":false}],"spread":true},{"title":"边缘描述.vsd <span style='color:#111;'> 56.00KB </span>","children":null,"spread":false},{"title":"mainwindow.cpp <span style='color:#111;'> 3.76KB </span>","children":null,"spread":false},{"title":"~$边界描述.docx <span style='color:#111;'> 162B </span>","children":null,"spread":false},{"title":"边界描述.docx <span style='color:#111;'> 51.43KB </span>","children":null,"spread":false},{"title":"mainwindow.h <span style='color:#111;'> 591B </span>","children":null,"spread":false},{"title":"image","children":[{"title":"blue.css <span style='color:#111;'> 8.77KB </span>","children":null,"spread":false},{"title":"radiobutton_unchecked.png <span style='color:#111;'> 240B </span>","children":null,"spread":false},{"title":"question.png <span style='color:#111;'> 3.86KB </span>","children":null,"spread":false},{"title":"test.html <span style='color:#111;'> 679B </span>","children":null,"spread":false},{"title":"error.png <span style='color:#111;'> 2.42KB </span>","children":null,"spread":false},{"title":"sub-line_vertical.png <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"scrollbar.css <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"gray.css <span style='color:#111;'> 8.18KB </span>","children":null,"spread":false},{"title":"radius_border.png <span style='color:#111;'> 3.40KB </span>","children":null,"spread":false},{"title":"black.css <span style='color:#111;'> 8.18KB </span>","children":null,"spread":false},{"title":"box-shadow.png <span style='color:#111;'> 588B </span>","children":null,"spread":false},{"title":"add-line_vertical.png <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"fontawesome-webfont.ttf <span style='color:#111;'> 138.25KB </span>","children":null,"spread":false},{"title":"info.png <span style='color:#111;'> 2.89KB </span>","children":null,"spread":false},{"title":"add-line_horizontal.png <span style='color:#111;'> 151B </span>","children":null,"spread":false},{"title":"radiobutton_checked.png <span style='color:#111;'> 355B </span>","children":null,"spread":false},{"title":"mtn.qss <span style='color:#111;'> 122B </span>","children":null,"spread":false},{"title":"array_down.png <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"radiobutton_checked_hover.png <span style='color:#111;'> 532B </span>","children":null,"spread":false},{"title":"checkbox_checked.png <span style='color:#111;'> 691B </span>","children":null,"spread":false},{"title":"checkbox_checked_hover.png <span style='color:#111;'> 266B </span>","children":null,"spread":false},{"title":"qt_zh_CN.qm <span style='color:#111;'> 114.59KB </span>","children":null,"spread":false},{"title":"radiobutton_unchecked_hover.png <span style='color:#111;'> 492B </span>","children":null,"spread":false},{"title":"Font Awesome Cheatsheet.png <span style='color:#111;'> 580.71KB </span>","children":null,"spread":false},{"title":"radio_selected.png <span style='color:#111;'> 1024B </span>","children":null,"spread":false},{"title":"checkbox_unchecked.png <span style='color:#111;'> 581B </span>","children":null,"spread":false},{"title":"navy.css <span style='color:#111;'> 8.18KB </span>","children":null,"spread":false},{"title":"radio_normal.png <span style='color:#111;'> 888B </span>","children":null,"spread":false},{"title":"sub-line_horizontal.png <span style='color:#111;'> 148B </span>","children":null,"spread":false}],"spread":false},{"title":"QssDemo.pro.user <span style='color:#111;'> 36.32KB </span>","children":null,"spread":false},{"title":"main.cpp <span style='color:#111;'> 374B </span>","children":null,"spread":false},{"title":"mainwindow.ui <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

  • weixin_43702352 :
    使用QGraphicsDropShadowEffect在低配置机器上是有卡顿的,博主的这个效果挺好。但如果同时给很多控件添加阴影重复代码实在太多了。请教博主有没有什么好方法可以优化?
    2020-03-16

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明