随笔分类 -  qt

1 2 3 4 5 ··· 8 下一页
摘要:RC_ICONS = $$PWD/res/app.ico 在pro文件中添加以上代码 阅读全文
posted @ 2024-08-05 15:26 雾枫 阅读(24) 评论(0) 推荐(0) 编辑
摘要:先代码设置MainWindow图标: // 主要用于在linux下运行程序时,在任务栏显示图标MainWindow w; w.setWindowIcon(QIcon(":/res/icon.png")); (*windows下设置生成的exe程序的ico图标后,默认也会对运行程序时任务栏的图标也设置 阅读全文
posted @ 2023-12-27 21:54 雾枫 阅读(892) 评论(0) 推荐(1) 编辑
摘要:原文链接:https://blog.csdn.net/qq_27597629/article/details/108886199#:~:text=1%EF%BC%8C%E5%88%9B%E5%BB%BA%E7%A8%8B%E5%BA%8F%E5%90%AF%E5%8A%A8%E8%84%9A%E6% 阅读全文
posted @ 2023-12-27 20:17 雾枫 阅读(375) 评论(0) 推荐(0) 编辑
摘要:1、先制作xx.ico格式的图标 2、创建发ico.txt格式的文本文件,输入内容:IDI_ICON1 ICON "xx.ico" 将.txt后缀更改为.rc 3、在qt工程中添加资源文件res,将xx.ico和ico.rc 添加到资源文件res中 4、在CMakeLists.txt中添加内容:ad 阅读全文
posted @ 2023-12-27 14:04 雾枫 阅读(408) 评论(0) 推荐(0) 编辑
摘要:for(int i=0;i<m_model->rowCount();i++) { //删除航点后,给前面的序号重新排序 m_model->item(i,0)->setText(QString::number(i+1)); } 阅读全文
posted @ 2023-09-20 14:41 雾枫 阅读(48) 评论(0) 推荐(0) 编辑
摘要:setWindowFlags(Qt::Tool);//不在任务栏显示 阅读全文
posted @ 2023-08-07 19:51 雾枫 阅读(135) 评论(0) 推荐(0) 编辑
摘要:/*重写该函数*/ void MainWindow::changeEvent(QEvent *event) { if(QEvent::WindowStateChange == event->type()) { QWindowStateChangeEvent * stateEvent = dynami 阅读全文
posted @ 2023-07-11 14:12 雾枫 阅读(1350) 评论(0) 推荐(0) 编辑
摘要:原文链接 阅读全文
posted @ 2023-07-10 18:14 雾枫 阅读(8) 评论(0) 推荐(0) 编辑
摘要:int iTitleBarHeight = style()->pixelMetric(QStyle::PM_TitleBarHeight); 阅读全文
posted @ 2023-07-10 16:55 雾枫 阅读(116) 评论(0) 推荐(0) 编辑
摘要:this->setAttribute((0t::WA TranslucentBackground,true);//窗体背景全诱明 阅读全文
posted @ 2023-06-29 13:56 雾枫 阅读(43) 评论(0) 推荐(0) 编辑
摘要:entitulist_ui = new Ui::Entitylist; equiplist_ui = new Ui::Equiplist; m_entityList = new QWidget(this); m_equipList = new QWidget(this); entitulist_ui 阅读全文
posted @ 2023-06-16 18:49 雾枫 阅读(160) 评论(0) 推荐(0) 编辑
摘要://实体列表 窗体背景透明 m_entityList->setWindowFlags(windowFlags() | Qt::FramelessWindowHint);//无边框 m_entityList->setAttribute(Qt::WA_TranslucentBackground, tru 阅读全文
posted @ 2023-06-16 17:23 雾枫 阅读(335) 评论(0) 推荐(0) 编辑
摘要:参考:原文链接 不一定非要用QGroupBox,其他继承自widget的控件都可以 我的实现: 阅读全文
posted @ 2023-06-15 17:03 雾枫 阅读(257) 评论(0) 推荐(1) 编辑
摘要:报错提示: 背景: 1. 在ubuntu下,编译了一套开源库,用的是qt5.9 2. 但是qt5.9特别不好用,我换成了qt5.14.2,但是担心会不会报错,因为编译开源库用到的是qt5.9的库 编译工程 1. 一直报上面那个错 2. 其他错误倒没有 解决: 1. 参考 原文链接 2. 我的修改 : 阅读全文
posted @ 2023-06-03 13:24 雾枫 阅读(571) 评论(0) 推荐(0) 编辑
摘要:ui->btn2->setStyleSheet("QPushButton{\ background:#EE6AA7;\ border:1px solid #8B7E66;\ border-radius:5px;\ color:white;\ }\ QPushButton:hover{\ backgr 阅读全文
posted @ 2023-06-02 17:48 雾枫 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-05-14 22:17 雾枫 阅读(5) 评论(0) 推荐(0) 编辑
摘要:void DisplayPathFilename::mainlayout() { m_hboxlayout->addWidget(m_filenamelabel); m_filenamelabel->setText("配置文件:"); m_hboxlayout->addWidget(m_filena 阅读全文
posted @ 2023-04-26 14:15 雾枫 阅读(1194) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 8 下一页
点击右上角即可分享
微信分享提示