Qt-在WIN10上实现毛玻璃效果(Aero效果,QML实现的,并不是C++语法)

相关资料:

https://blog.csdn.net/qq_40194498/article/details/79849807   怎么创建一个QML工程

https://blog.csdn.net/robertkun/article/details/42007901     QML设置背景图片

https://www.cnblogs.com/surfsky/p/4275346.html   毛玻璃原文章

https://download.csdn.net/download/zhujianqiangqq/13092324  代码包下载

 

PS:使用C++语法的IsCompositionEnabled函数实现的都是利用系统函数实现的,IsCompositionEnabled中对系统版本做了判断,开启条件必须是WIN8以下系统。具体可查看QT自代实例“Music Player”。

 

.pro

 1 QT += quick
 2 
 3 CONFIG += c++11
 4 
 5 # The following define makes your compiler emit warnings if you use
 6 # any Qt feature that has been marked deprecated (the exact warnings
 7 # depend on your compiler). Refer to the documentation for the
 8 # deprecated API to know how to port your code away from it.
 9 DEFINES += QT_DEPRECATED_WARNINGS
10 
11 # You can also make your code fail to compile if it uses deprecated APIs.
12 # In order to do so, uncomment the following line.
13 # You can also select to disable deprecated APIs only up to a certain version of Qt.
14 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
15 
16 SOURCES += \
17         main.cpp
18 
19 RESOURCES += qml.qrc
20 
21 # Additional import path used to resolve QML modules in Qt Creator's code model
22 QML_IMPORT_PATH =
23 
24 # Additional import path used to resolve QML modules just for Qt Quick Designer
25 QML_DESIGNER_IMPORT_PATH =
26 
27 # Default rules for deployment.
28 qnx: target.path = /tmp/$${TARGET}/bin
29 else: unix:!android: target.path = /opt/$${TARGET}/bin
30 !isEmpty(target.path): INSTALLS += target
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-19
  • 2021-05-29
  • 2021-09-11
  • 2021-10-21
  • 2021-10-28
相关资源
相似解决方案