Qt QLabel加载图片
2024-10-19 16:46:41
QLabel加载图片
//在对应的控件中显示图片
void qm_img::DisplayImg(cv::Mat imgParam, QLabel *labelParam)
{
if (!imgParam.empty())
{
cv::Mat img_index1 = imgParam.clone();
//cvtColor(img_index1, img_index1, cv::COLOR_BGR2RGB);
QImage qimg1 = Mat2QImage(img_index1);
labelParam->clear();
//labelParam->setScaledContents(true);
labelParam->setPixmap(QPixmap::fromImage(qimg1));
//labelParam->resize(labelParam->pixmap()->size());
labelParam->show();
}
}
最新文章
- Unity3D新手引导开发手记
- 优才网Go名库讲解全套教程
- 用 C 扩展 python
- RabbitMQ(五) -- topics
- Django~NewProject and APP
- osg中使用MatrixTransform来实现模型的平移/旋转/缩放
- 第十五章:Android 调用WebService(.net平台)
- 18.allegro区域约束规则设置
- wpa_supplicant使用笔记
- es6整理
- Micosoft.ReportViewer.WebForms v 11.0... 1.0.1
- Forms Authentication in ASP.NET MVC 4
- poj 1142 Smith Numbers
- 决策树ID3算法
- JS中怎样判断undefined(比较不错的方法)
- Servlet以及单例设计模式
- POJ 2139 Six Degrees of Cowvin Bacon (Floyd)
- sql server得到某个数据库的所有表和所有字段
- 彻底卸载Oracle database 12c教程
- leetcode74:二维矩阵搜索问题
热门文章
- :Spring-06 -AOP [面向切面编程] -配置异常通知的两种方式--AspectJ 方式 -Schema-based 方式
- 【Low版】HAUT - OJ - Contest1035 - 2017届新生周赛(六)题解
- 工作中 99% 能用到的 Git 命令
- Flask - 四剑客 | templates | 配置文件 | 路由系统 | CBV
- vue中input输入第一个字符时,光标会消失,需要再次点击才能输入
- Continuous Subarray Sum II
- Emmet的HTML语法(敲代码的快捷方式)
- Centos7 minimal 安装npm
- C++编程习惯
- 06.volatile关键字