会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
不倒的土豆
好记性不如个烂笔头
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
11
···
17
下一页
2022年6月29日
qt 文件改名
摘要: 遇到过这种情况:对某个文件名字进行修改。 下面是把文件名前加done,所以只传入了要修改的文件名。 1 bool RenameFile(QString oldName) 2 { 3 QFileInfo file(oldName); 4 if(!file.exists()){ 5 QString st
阅读全文
posted @ 2022-06-29 13:38 阳光下的小土豆
阅读(1619)
评论(0)
推荐(0)
2022年3月28日
QTableWidget 初始化
摘要: 一段代码: void InitSpeedSystemTable(int row) { ui->tableSpeedSystem->clear(); ui->tableSpeedSystem->horizontalHeader()->setVisible(true); ui->tableSpeedSy
阅读全文
posted @ 2022-03-28 14:56 阳光下的小土豆
阅读(384)
评论(0)
推荐(0)
2022年3月18日
sqlite 判断某条数据是否存在
摘要: 1、判断某条数据是否存在 bool DataBaseManager::WriteConfigure(QString configureName, QString configureVal) { QString sql = QString("select 1 from Configure where
阅读全文
posted @ 2022-03-18 14:36 阳光下的小土豆
阅读(3747)
评论(0)
推荐(0)
2022年3月14日
qjson 读写
摘要: 读: json: { "first": { "second": { "third1":"23423", "third2":"2323" }, "four":"234234" }, "five":"34234" } 代码: const QString Results = "first"; const
阅读全文
posted @ 2022-03-14 19:17 阳光下的小土豆
阅读(202)
评论(0)
推荐(0)
qpushbutton 按下状态 ,图片更改
摘要: 当工具栏的按钮被按下,图标保持不变,需要怎么做? 下面是qss,另外需要设置按钮 checkable 为true QPushButton#btnZHGL { border-radius:10px; font-size:28px; font-family:Microsoft YaHei; font-w
阅读全文
posted @ 2022-03-14 17:46 阳光下的小土豆
阅读(1024)
评论(0)
推荐(0)
Qlabel设置背景图片
摘要: QImage *img = new QImage; img->load(pic); QPixmap pixmap = QPixmap::fromImage(*img); QPixmap fitpixmap = pixmap.scaled(50, 50, Qt::IgnoreAspectRatio,
阅读全文
posted @ 2022-03-14 17:41 阳光下的小土豆
阅读(1965)
评论(0)
推荐(0)
2022年3月9日
QListWidget 使用
摘要: 1、QListWidget 插入Qwidget QListWidgetItem *widgetItem = new QListWidgetItem(ui->listWidget); widgetItem->setSizeHint(QSize(94, 48)); ui->listWidget->add
阅读全文
posted @ 2022-03-09 13:49 阳光下的小土豆
阅读(816)
评论(0)
推荐(0)
2022年1月11日
QTimer使用
摘要: 1 头文件 2 QTimer m_timer; 3 void SlotTimer(); 4 5 源文件 6 connect(&m_timer, SIGNAL(timeout()), this, SLOT(SlotTimer())); 7 void VideoControl::SlotTimer()
阅读全文
posted @ 2022-01-11 14:34 阳光下的小土豆
阅读(61)
评论(0)
推荐(0)
2022年1月7日
map 查找键 并删除,遍历
摘要: 转自:https://www.zhaokeli.com/article/8309.html 1 map<string,int>::iterator key = cmap.find("Anna"); 2 if(key!=cmap.end()) 3 { 4 cout<<key->second<<endl
阅读全文
posted @ 2022-01-07 11:09 阳光下的小土豆
阅读(236)
评论(0)
推荐(0)
2021年12月20日
qt 判断文件是否存在
摘要: 1. 判断文件夹是不是存在 1 QString fullPath;//文件夹全路径 2 /*方法1*/ 3 bool isDirExist(QString fullPath) 4 { 5 QDir dir(fullPath); 6 if(dir.exists()) 7 { 8 return true
阅读全文
posted @ 2021-12-20 11:21 阳光下的小土豆
阅读(2567)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
11
···
17
下一页
公告