Skip to content

nbxiangjian/Qt-Examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qt的一些简单常用示例

1. Battery——电池;

2. BubbleWindow——气泡式对话框,也可作工具提示(ToolTip);

3. Chart——可视化图表绘制,参考 使用 QChart 显示实时动态曲线 和QChart相关示例;

图一二是动态曲线
图一二是动态曲线, 图二坐标轴也会动态变化

4. CheckBoxStandardItem——可勾选StandardItem;

5. Clock——时钟;

6. DashBoard——仪表盘;

7. FlowLayout——流式布局,来自QT示例Flow Layout Example;

8. DragDrop——简单控件拖拽,参考QT示例Drag and Drop Puzzle Example;

9. HttpClient ——http客户端;

10. GridViewModel ——基于QListView的自适应宫图;

11. LogAsynchronous——异步日志,开辟一个线程专门往文件里写日志,前后端分离。

  1. 日志文件名:应用程序名(appname).时间(time,精确到秒).主机hostname.进程ID(Tid).log(.count),假如一天内写的单个日志大约接近1G,会自动加后缀(.1,.2.3...,以此类推)新建新的日志文件去写,每天0点依然会rollFile;
    1. 正常文件名:LogAsynchronous.2020-04-26-20-29-03.Youth.11828.log;
    2. 当日写日志接近1G,新建的文件名:LogAsynchronous.2020-04-26-20-38-55.Youth.11828.log.1;
  2. 日志格式:时间(time,精确到毫秒).线程ID(Pid).日志级别(debug).打印信息(msg).文件(File).行号(Line)。
    1. 比如:2020-04-26 20:38:55.818 2052 [Debug] 123456789qwertyuioplkjhgfdsa 8412789-File:(..\logAsynchronous\main.cpp) Line:(19);

12. MulClient——多线程客户端,一个线程一个客户端(怎么可以绕开系统限制,模拟百万个客户端);

13. MulServer——多线程服务端,一个线程一个客户端处理(处理实时性很高的TCP通讯);

14. NavigationProgressBar——导航进度栏;

15. PasswordLineEdit——密码输入框;

16. ProgressArc——圆弧进度条;

17. ProgressBar——QProgressBar圆角替代方案;

18. ReactorServer——多线程服务端,Reactor模式(Echo);

19. SimpleUdp——简单UDP例子,广播和接收;

防火墙白名单。

20. SlipButton——滑动按钮;

另:更简单的实现:有动画效果的 CheckBox

21. SqlTabview——SQLite数据库调用,模型方法;

22. TableViewModel——表格视图,DeleGate(Button and ProgressBar)(MVC);

套用了旧的样式(懒),具体可以自己调整;

23. Thread——多线程例子,6种写法;

24. TreeViewModel——树形视图(MVC),QtCreator源码;

25. Validator——加强版IntValidator(QIntValidator)和DoubleValidator(QDoubleValidator)

26. Scripts——打包脚本

  1. macos——macos 通用编译打dmg包脚本(python/dmgbuild);

  2. widnows——windows 通用编译打包安装脚本(Innosetup);

    1. Innosetup signtool

      sha256="C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.18362.0\\x86\\signtool.exe" sign /f C:\\work\\certificate\\xxxxx.pfx /p password /fd SHA256 /tr http://timestamp.digicert.com/scripts/timestamp.dll /td SHA256 $f
      

About

一些简单常用的QT示例

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 82.2%
  • QMake 7.0%
  • Inno Setup 4.1%
  • Python 3.6%
  • CMake 3.0%
  • C 0.1%