会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
jota
博客园
首页
新随笔
联系
订阅
管理
2025年8月11日
bytes和基本数据类型之间的转换
摘要: main.cpp #include <QCoreApplication> #include "CommonFun.h" #include <QtEndian> #include <QDebug> int main(int argc, char *argv[]) { QCoreApplication
阅读全文
posted @ 2025-08-11 15:43 上车去广西
阅读(74)
评论(0)
推荐(0)
2025年4月29日
Qt判断编译器CPU架构
摘要: 在.pro文件中加入 #32位 contains(QT_ARCH, i386){ //x86架构 32位 CONFIG(release, release | debug){ DESTDIR = $$PWD/bin/x86/release } else { DESTDIR = $$PWD/bin/x8
阅读全文
posted @ 2025-04-29 11:44 上车去广西
阅读(100)
评论(0)
推荐(0)
2025年4月24日
Qt配置编译依赖
摘要: 显示指定依赖关系,自动调整编译顺序 TEMPLATE = subdirs SUBDIRS = core gui plugins tests gui.depends = core # gui 依赖 core plugins.depends = core gui # plugins 依赖 core 和
阅读全文
posted @ 2025-04-24 17:29 上车去广西
阅读(74)
评论(0)
推荐(0)
使用 QZipReader/QZipWriter 解压/压缩 Zip格式文件
摘要: pro文件需配置 QT += gui-private 代码 #include <QCoreApplication> #include <QDir> #include <QFile> #include <QDebug> #include "QZipReader.h" // 解压 void extrac
阅读全文
posted @ 2025-04-24 15:01 上车去广西
阅读(278)
评论(0)
推荐(0)
进度条对话框的使用
摘要: void MainWindow::on_pushButton_clicked() { bool Canceled = false; QProgressDialog dialog("文件复制进度", "取消", 0, 50000, this); dialog.setWindowTitle("进度对话框
阅读全文
posted @ 2025-04-24 11:23 上车去广西
阅读(19)
评论(0)
推荐(0)
2025年4月23日
使用 toStdString().c_str() 的注意事项
摘要: QString str = "Hello, world!"; // 错误用法 const char *szCopy = str.toStdString().c_str(); qDebug() << szCopy; // 输出空 // 正确用法 QString strCopy = str.toStdS
阅读全文
posted @ 2025-04-23 17:01 上车去广西
阅读(84)
评论(0)
推荐(0)
Qt学习博客
摘要: 名称 网址 豆子的空间 https://www.devbean.net
阅读全文
posted @ 2025-04-23 15:53 上车去广西
阅读(20)
评论(0)
推荐(0)
2025年4月22日
Qt的 *.pro 文件属性配置
摘要: 打开可加载大文件 CONFIG += resources_big 配置生成的可执行文件或库文件名称 TARGET = xxx 配置生成的文件类型 exe TEMPLATE = app lib TEMPLATE = lib 添加定义宏 DEFINES += xxx 引用依赖库 方式1 LIBS +=
阅读全文
posted @ 2025-04-22 14:29 上车去广西
阅读(66)
评论(0)
推荐(0)
2025年4月18日
Qt笔记
摘要: 1. 从布局对象中移除组件后要手动释放 ui->verticalLayout->removeWidget(ui->pushButton); if (ui->pushButton!= nullptr) { delete ui->pushButton; ui->pushButton = nullptr;
阅读全文
posted @ 2025-04-18 16:42 上车去广西
阅读(27)
评论(0)
推荐(0)
QStringListModel用法示例
摘要: mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QStringListModel> QT_BEGIN_NAMESPACE namespace Ui { class Main
阅读全文
posted @ 2025-04-18 16:00 上车去广西
阅读(17)
评论(0)
推荐(0)
下一页
公告