技术栈

QT学习笔记

niuniuyi~2026-06-11 14:09

QT学习笔记

  • 基本语法

基本语法

  1. 头文件
cpp 复制代码
#include<QApplication>
#include<QLabel>
#include<QLineEdit>
#include<QPushButton>  //水平布局
#include<QHBoxLayout>  //垂直布局
#include<Qwidget>
  1. 信号与槽
cpp 复制代码
#include<QProcess>

//连接信号与槽 谁发出信号 发出什么信号 谁处理信号 怎么处理
connect(ui->cmdLineEdit,SIGNAL(returnPressed()),this,SLOT(on_commitButton_clicked());
connect(ui->cancelButton,&QPushButton::clicked,this,&Widget::on_cancelButton_click);
上一篇:Spring Boot 多角色权限隔离实战:接口层+路由层+UI层三层防御,杜绝生产数据泄露
下一篇:工业高危场景防爆监控选型指南:主流厂商技术与方案解析
相关推荐
用户80553369803
3 天前
不止三件套:QObject 属性系统全关键字与运行时反射!
c++·qt
xcyxiner
3 天前
DicomViewer (vcpkg Windows和ubuntu编译)7
qt
RainCity
3 天前
Java Swing 自定义组件库分享(十二)
java·笔记·后端
Quz
8 天前
QML Hello World 入门示例
qt
LinXunFeng
10 天前
Obsidian - 使用 Share Note 分享笔记并自部署
前端·笔记·github
xcyxiner
11 天前
DicomViewer (dcmtk读取dcm文件)5
qt
xcyxiner
11 天前
DicomViewer (后台线程处理文件)4
qt
xcyxiner
12 天前
DicomViewer (添加模型类)3
qt
xcyxiner
12 天前
DicomViewer (目录调整) 2
qt
xcyxiner
13 天前
dcmtk vtk vtk-dicom(gdcm) 编译(debug) v2
qt
热门推荐
012026 年 AI 编程工具终极横评:Cursor vs Claude Code vs Copilot vs Windsurf022026年6月AI大模型全景报告:GPT-5.6、Claude Opus 4.8、Gemini 3.5,中美AI三足鼎立谁主沉浮?032026年6月AI行业全景:从百模大战到Agent元年,这30天发生了什么?04GitHub 镜像站点05Trae国际版与国内版深度测评:AI原生IDE的双生花06【AI】2026 年具身智能模型和世界模型总结07飞书长连接_事件订阅(接收消息,审批任务状态变更)08Claude Code、Codex、Cursor三分天下:2026年AI编程Agent生态全景剖析092026 AI 编程工具终极实战指南:Cursor vs Claude Code vs Copilot,开发者该怎么选?102026年AI架构实战:彻底解决OpenAI接口超时与封号,Python调用GPT-5.2/Sora2企业级架构详解(附源码+压测报告)