mytimer.zip

时间:2023-04-16 11:37:18
【文件属性】:
文件名称:mytimer.zip
文件大小:5KB
文件格式:ZIP
更新时间:2023-04-16 11:37:18
QT 1、创建继承QWidget的qt界面类,添加新文件-添加类-命名为myThread类,该类继承QWidget,但在文件继承中要更改为QThread,如下图所示。 2、线程设计:创建线程发射信号,对run函数进行实现,其中run函数相当于main函数,创建线程后会自动调用run函数。 3、主界面设计:对开始和停止按钮创建槽函数,对线程启动(start)和终止(terminate)写入槽函数中;创建线程发射信号连接connect,对连接槽函数实现lcd_number进行display显示。
【文件预览】:
mytimer
----main.cpp(175B)
----mythread.cpp(282B)
----mythread.h(345B)
----widget.h(454B)
----widget.cpp(654B)
----mytimer.pro.user(23KB)
----mytimer.pro(1KB)
----widget.ui(977B)

网友评论