随笔分类 -  qt

摘要:#include <iso646.h> int main() { int a =0; int b =1; bool = a and b; } 阅读全文
posted @ 2022-10-11 22:27 雾枫 阅读(200) 评论(0) 推荐(0) 编辑
摘要:QTableWidgetItem* pItem = ui.tablewidget->item(iRowIndex, iColIndex); //获取该单元格的pItem pItem->setFlags(Qt::ItemIsEditable); 阅读全文
posted @ 2022-10-09 15:54 雾枫 阅读(318) 评论(0) 推荐(0) 编辑
摘要:链接1 链接2 (1)创建一个新的表格控件 QTableWidget *table=new QTableWidget(); (2)设置列数 table->setColumnCount(3);//设置3列 注意:如果内容超过3列,则无法显示超过3列的内容,所以需要看情况重新设置列数 (3)设置行数 t 阅读全文
posted @ 2022-10-09 15:46 雾枫 阅读(1611) 评论(0) 推荐(0) 编辑
摘要:#include "w_titlebarwidget.h" #include <QLabel> #include <QToolButton> #include <QHBoxLayout> #include <QDesktopWidget> #include <QApplication> #inclu 阅读全文
posted @ 2022-10-08 20:47 雾枫 阅读(63) 评论(0) 推荐(0) 编辑
摘要:QWidget *w=new QWidget(this); w->setGeometry(0,0,500,80); QHBoxLayout *layout=new QHBoxLayout; QPushButton *button1=new QPushButton; QPushButton *butt 阅读全文
posted @ 2022-10-08 20:23 雾枫 阅读(685) 评论(0) 推荐(0) 编辑
摘要:bool clearDir(QString path) { if (path.isEmpty()) { return false; } QDir dir(path); if (!dir.exists()) { return false; } dir.setFilter(QDir::AllEntrie 阅读全文
posted @ 2022-10-06 00:41 雾枫 阅读(882) 评论(0) 推荐(0) 编辑
摘要:QString path = "D:\\file\\test"; QDir dir(path); dir.removeRecursively(); 阅读全文
posted @ 2022-10-06 00:28 雾枫 阅读(112) 评论(0) 推荐(0) 编辑
摘要:链接一 阅读全文
posted @ 2022-09-29 22:03 雾枫 阅读(6) 评论(0) 推荐(0) 编辑
摘要:vs+qt 动态库无法解析外部符号的问题 原文链接 https://itcn.blog/p/0541664353.html 1、问题描述:无法解析的外部符号 解决方案:引用的库没有引用进来,结局方案如下: (1)先看一下生成的库输入位置在哪里。在动态库项目右击,选择“属性”->链接器->常规->输出 阅读全文
posted @ 2022-09-29 11:30 雾枫 阅读(715) 评论(0) 推荐(0) 编辑
摘要:void Titlebarwidget::_setBackgroundColor() { QColor color(255,255,255); QPalette pal(palette()); pal.setColor(QPalette::Background, color); setAutoFil 阅读全文
posted @ 2022-09-27 17:49 雾枫 阅读(215) 评论(0) 推荐(0) 编辑
摘要:QToolButton#minBtn:hover,QToolButton#maxBtn:hover,QToolButton#restoreBtn:hover{ background: rgb(255, 255, 255); } QToolButton#minBtn:pressed,QToolButt 阅读全文
posted @ 2022-09-27 13:20 雾枫 阅读(650) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/linuxAndMcu/p/11039769.html 阅读全文
posted @ 2022-09-27 11:28 雾枫 阅读(141) 评论(0) 推荐(0) 编辑
摘要:setWindowFlags(Qt::Window | Qt::FramelessWindowHint); 阅读全文
posted @ 2022-09-26 21:57 雾枫 阅读(99) 评论(0) 推荐(0) 编辑
摘要:#pragma once #include <QApplication> #include <QDir> #define IMAGE_PATH(name) QApplication::applicationDirPath() + QDir::separator() +"image" +QDir::s 阅读全文
posted @ 2022-09-26 15:14 雾枫 阅读(383) 评论(0) 推荐(0) 编辑
摘要:ui.treeWidget->setItemsExpandable(true); //true:父节点能被点击,false :父节点不能被点击ui.treeWidget->expandAll(); //展开所有的节点 阅读全文
posted @ 2022-09-24 13:42 雾枫 阅读(1533) 评论(0) 推荐(0) 编辑
摘要:m_ui.splitter->setStretchFactor(0, 1); m_ui.splitter->setStretchFactor(1, 200);// 0 和 1 代表分割器里的widget索引号,设置widget对应的索引的比例 阅读全文
posted @ 2022-09-15 11:26 雾枫 阅读(146) 评论(0) 推荐(0) 编辑
摘要:QLabel *state_msg = new QLabel(this); state_msg->setMinimumSize(state_msg->sizeHint()); //设置label属性 state_msg->setAlignment(Qt::AlignHCenter); //设置lab 阅读全文
posted @ 2022-08-30 15:12 雾枫 阅读(259) 评论(0) 推荐(0) 编辑
摘要:链接 阅读全文
posted @ 2022-08-24 21:39 雾枫 阅读(5) 评论(0) 推荐(0) 编辑
摘要:ui.tableWidget_gongkuang->setItem(_index, 2, new QTableWidgetItem(QString::number(_Beng_JinChuKou_ZongYaCha))); //总压差 ui.tableWidget_gongkuang->viewpo 阅读全文
posted @ 2022-08-21 18:30 雾枫 阅读(306) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示