This commit is contained in:
2025-08-23 15:15:57 +08:00
commit b5fbaa9db5
167 changed files with 2087 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

13
QT/第七章.md Normal file
View File

@ -0,0 +1,13 @@
![[第7章(3课时已更新.ppt]]
第7章重点信号槽的机制和自定义信号槽的使用。了解对象树的机制例如界面类。了解容器、qlist、qstring、qbytearray、qvariant的使用。
![[3e079b2dacb0c6d1a5a22349efca51f.png]]
![[6de3c18328b5209ba72b85b12830e85.png]]
![[31b4af2c637c34f5dd9a2178805f566.png]]
![[1c67bddb94794a221a0b270fce22add.png]]
当然习惯于传统for的使用的人还是很多的。

20
QT/第三章.md Normal file
View File

@ -0,0 +1,20 @@
![[第3章(1课时已更新.ppt]]
第3章重点是使用基础窗口和组件以及使用槽函数连接在其上面点击等操作发出的信号进行自己具体的操作。
![[d836ca5bf444fbea85c5d62b9b84b36.png]]
各个组件可以像这样,拖拽到界面,然后通过创建槽,连接各组件的信号,熟悉组件的用法。
![[decdc9e3db801e3e9d27d3e5e454975.png]]
![[6480b14aaf7b6b0b15a9ff78f0a1716.png]]
![[bffa6e3037d447b3f1fb9186bc405be.png]]
![[5442927f2ae1aeb7e85ea257b063642.png]]
![[cb355e9a8c05d1029098edb443cf7b0.png]]
![[ac6c40c81e6d5d1b07aa9f0cb2c8995.png]]
信号槽的连接connect和转到槽都试一下这两种用的多。另一种用的少可以以后再熟悉。
![[6a34489b1f2cf3d7f825b6589d97c12.png]]
![[48c249bf0d77938a3bae9cad52c467d.png]]
![[2301b46bffa58656717f4dccdd25272.png]]

11
QT/第九章.md Normal file
View File

@ -0,0 +1,11 @@
![[第9章(3课时已更新.ppt]]
第9章重点国际化翻译的使用。创建插件dll和应用程序使用插件。
![[76ccc2eb91d810fb120769a20b187df.png]]
这是qt插件的一个示意图
如果不使用动态加载dll可以在pro文件配置。
![[9bb714eef96f1a75085dbf443150a33.png]]
![[testPlugin.zip]]
![[testPluginApp.zip]]

23
QT/第二十章.md Normal file
View File

@ -0,0 +1,23 @@
![[第20章(1课时已更新.ppt]]
QWaitCondition的使用
![[7941646ae9f8aeb7212bf21961ac0b79_.png]]
![[ce35786fa07e588a9538c0dad8daf521_.png]]
![[278efd24a2830685a4398e4f1faa1194_.png]]
"1thread" 0
"1thread" 1
"1thread" 2
"1thread" 3
"1thread" 4
"1thread" 5
"1thread" 6
"1thread" 7 这里已经满了,无法生产了
"2thread" 0 消费一个之后
"1thread" 8 才能继续生产
"2thread" 1
"1thread" 9
"2thread" 9
![[3451d9c3e1cfa4f092b55089d9a871b2_.png]]
使用两个线程是这样的。
![[threadclock.cpp]]
![[GlobalData.h]]
![[threadclock.h]]

5
QT/第二章.md Normal file
View File

@ -0,0 +1,5 @@
![[第2章(2课时已更新.ppt]]
第2章重点创建新的widget工程设计界面.ui文件的拖拽实现界面应用程序依赖的dll设置应用程序图标icon。工程文件.pro的说明。代码自动补全功能。
![[4304673e2ea5db096c7de5eed4c5e9f.png]]

3
QT/第五章.md Normal file
View File

@ -0,0 +1,3 @@
![[第5章(3课时已更新.ppt]]
第5章 重点和优先级。1、优先级最高-主窗口的实现mainwindow的使用。包括菜单栏、工具栏、中心组件、dock、statusbar。2、拖动的大致实现过程可以敲一敲课件的代码熟悉一下或者简单的输出信息

5
QT/第八章.md Normal file
View File

@ -0,0 +1,5 @@
![[第8章(1课时已更新.ppt]]
第8章重点qt样式表的使用特别是qss文件的方式
关于样式表的使用qt助手中有样例。搜索Qt Style Sheets Examples即可。
![[46e658d6041b47fb78aa4720dd81569.png]]

5
QT/第六章.md Normal file
View File

@ -0,0 +1,5 @@
![[第6章(1课时已更新.ppt]]
第6章重点事件处理函数的使用例如鼠标、键盘事件过滤器的使用定时器的使用信号槽方式
其中,事件过滤器,很有用。

30
QT/第十七章.md Normal file
View File

@ -0,0 +1,30 @@
![[第17章(2课时已更新.ppt]]
第17章重点qt连接数据库的使用。
安装完mysql在odbc配置数据源。
![[92f8bd976d775f7a9b67c3c6954238f.png]]
将lib和dll文件从mysql安装目录找到复制到qt的安装目录下。
![[8d3b90f415b25cbefd48f544124e91d.png]]
![[4ece700f456523e757d44c56c6d11d2.png]]
![[325df8980ecb953d6b11a42310eb2ae 1.png]]
![[68834c79fd94cac9456844aabdb91e2.png]]
常用的一些sql语句
#创建数据库
create database db_name;
#使用数据库,也就是指定当前数据库。
use db_name;
#创建表
create table tb_name (
id int auto_increment primary key,
name varchar(20)
);
#插入数据
insert into tb_name (id, name) values (1,zhao);
#更新数据
update tb_name set name = qian where id = 1;
#删除数据
delete from tb_name where id = 1;
#删除表
drop table tb_name;

22
QT/第十九章.md Normal file
View File

@ -0,0 +1,22 @@
![[第19章(1课时已更新.ppt]]第19章重点线程的使用子类化和线程同步锁和信号量
![[fd4fbf294881512f4a25b16894c2c7ec_.png]]
![[85742fec35bea44361c110e5d9934595_.png]]
一个简单的线程示例,显示当前时间,通过信号槽发送到主线程。
这是我以前写的共享内存的实例代码,共享内存的优先级可以放在后面。
![[027d147db3a0ebe921fd9ad2e9664076_115f7bca329ae801314a770f5d12bdaa_8.zip]]
![[9bfbc9579e6bae78e3887c20a924a060_a82e3bb329e4a61e49d2ee60c669447a_8 1.zip]]
线程和锁的示例:
![[4ae3509a77bbba8eb07fa1aa3d5cdebd_.png]]
![[e126ed32ceb5545b7dc71b6d505d9d8d_.png]]
![[85d88d848f33e6741bd89f976b0799a3_.png]]
一个简单的锁的样例
读锁是不阻塞的
![[a664b00245443af2610ed85316be5baa_.png]]
![[13a1d2593a339ca6e1dd82d2e4c666cf_.png]]
读写锁之间是阻塞的
![[6994f7ae22e288920d7f8c48131a7863_.png]]
![[1aee77a18abcc6bd172fafd345914a25_.png]]
![[601af90279996ffd05fc554b3655fdc2_.png]]
![[faf3e195b449015d171c7627d01bd55b_.png]]

10
QT/第十五章.md Normal file
View File

@ -0,0 +1,10 @@
![[第15章(1课时已更新.ppt]]
第15章重点文件的操作打开、读写、关闭配置文件ini的使用qsettings。其次文件监视器QFileSystemWatcher
![[f87337629223e006d36bff6a9712231.png]]
![[2058cd9a063c9e68f8c25ac2d89dfa3.png]]
以上是QSettings读写配置文件ini的例子
![[1c96f27ff7d0ff328031518234a3820.png]]
![[ec811ac7cf10e0a88a1f84da045270f.png]]
以上是qfile读写文件的例子
![[8d8913f24215ff42251fdf6717d1407.png]]

8
QT/第十八章.md Normal file
View File

@ -0,0 +1,8 @@
![[第18章(2课时已更新.ppt]]
第18章重点udp的使用客户端和服务端udp和tcp的区别其次是tcp的使用客户端和服务端
我自己以前写过这两部分的小demo。发出来给大家参考大家可以结合课件具体写出代码练习。
![[tcp_client.zip]]
![[udp_client.zip]]
![[udp_server.zip]]
![[tcp_server.zip]]

8
QT/第十章.md Normal file
View File

@ -0,0 +1,8 @@
![[第10章(2课时已更新.ppt]]
![[第11章(2课时已更新.ppt]]
![[第12章(1课时已更新.ppt]]
![[第13章(1课时已更新.ppt]]
![[第14章(1课时已更新.ppt]]
我把我这里的一个qss文件发出来大家参考一下
![[style.qss]]
第10章重点使用painter简单绘制文字、线、矩形、多边形等简单形状。本章优先级可以放在其他章的后面。

7
QT/第四章.md Normal file
View File

@ -0,0 +1,7 @@
![[第4章(1课时已更新.ppt]]
第4章重点boxlayout基本布局另外几个布局其次。伙伴和tab顺序排在布局后面有空再熟悉。
代码示例
![[d99805b18eff46c65eaaa9e88ee9daa.png]]
![[d08f9e7c0915b0a331202b67cda69e9.png]]

51
QT/补充内容.md Normal file
View File

@ -0,0 +1,51 @@
![[kafka_2_消息队列通信的模式.pptx]]![[kafka_1_概念.pptx]]
![[kafka_4_消息格式.pptx]]
![[kafka_3_架构原理.pptx]]
![[RocketMq_1_原理.pptx]]
![[RocketMq_2_消息格式.pptx]]
qcustomplot是一个第三方库用来绘制图表的很有名。以后如果遇到绘制图表的需求就会用到它。
官网。https://www.qcustomplot.com/index.php/introduction
1、 下载后将qcustomplot.cpp和qcustomplot.h加入到工程中。
2、 在.pro文件添加打印支持。greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport。否则编译会报错。c++11支持在工程中已经自动添加了。
3、 example是例子程序里面有各种图表。
![[qcustomplot.zip]]
![[016cf2ec99554101094703fbf2d0c6ee_.png]]
![[aaa800e142788cf565ac37315721a8a0_.png]]
![[9880bbadba9f47a4f5ea039bf6a5c589_.png]]
![[298e44ff81e6f5da424ed5794b746193_.png]]
还有另一个第三方库也是用来制作图表的qwt。
官网https://sourceforge.net/projects/qwt/
这个库的使用不是把代码添加进来,而是把动态库添加进来。
步骤:
1、先把qwt-6.1.4.zip解压
进入目录下面用Qt Creator打开qwt.pro文件即打开了Qwt工程。
编译生成的库文件都在build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug下面。
2、
将build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\lib下的libqwt.a和libqwtd.a复制到D:\Qt\Qt5.12.3\5.12.3\mingw73_32\lib下。
将build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\lib下的qwt.dll和qwtd.dll复制到D:\Qt\Qt5.12.3\5.12.3\mingw73_32\bin下。
将build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\plugins\designer下的qwt_designer_plugin.dll复制到D:\Qt\Qt5.12.3\5.12.3\mingw73_32\plugins\designer下。
在D:\Qt\Qt5.12.3\5.12.3\mingw73_32\include下新建一个Qwt的文件夹将D:\Qwt-6.1.4\src下的所有.h头文件复制到新建的Qwt文件夹下。
3、新建Qt工程在.pro文件加入
1. DEFINES += QT_DLL QWT_DLL
2.
3. LIBS += -lqwtd
4.
5. LIBS += -lqwt
6.
7. INCLUDEPATH +=D:\Qt\Qt5.12.3\5.12.3\mingw73_32\include\Qwt
4、使用qt designerqt creator里面的设计界面会看不到组件只能看到位置打开ui界面文件可以拖拽qwt组件到界面上。
![[qwt-6.1.4.zip]]