相关资料:
https://blog.csdn.net/qq_41399894/article/details/93483507?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-2&spm=1001.2101.3001.4242
https://download.csdn.net/download/zhujianqiangqq/18466204 代码包下载
.pro
1 #------------------------------------------------- 2 # 3 # Project created by QtCreator 2019-06-24T11:25:07 4 # 5 #------------------------------------------------- 6 7 QT += core gui 8 9 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 11 TARGET = untitled 12 TEMPLATE = app 13 14 # The following define makes your compiler emit warnings if you use 15 # any feature of Qt which as been marked as deprecated (the exact warnings 16 # depend on your compiler). Please consult the documentation of the 17 # deprecated API in order to know how to port your code away from it. 18 DEFINES += QT_DEPRECATED_WARNINGS 19 20 # You can also make your code fail to compile if you use deprecated APIs. 21 # In order to do so, uncomment the following line. 22 # You can also select to disable deprecated APIs only up to a certain version of Qt. 23 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 24 25 26 SOURCES += main.cpp\ 27 mainwindow.cpp \ 28 mybtn.cpp 29 30 HEADERS += mainwindow.h \ 31 mybtn.h 32 33 FORMS += mainwindow.ui 34 35 RESOURCES += \ 36 image.qrc