QLable 显示图片
2024-09-24 13:27:27
1,各种对就是不显示,因为路径中有其它符号如\n\r什么的
QStringList FileOpeartion::PathCombine (const QString strPath, QStringList strListTemp)
{
QStringList strReturn; foreach (const QString &str, strListTemp)
{
if (!str.isEmpty())
{
strReturn << strPath.trimmed() + str.trimmed();
}
} return strReturn;
} QPixmap FileOpeartion::GetPicture (QString strPath, int mWidth, int mHeight)
{
QPixmap pictureimg;
//"D:dataFolder/2015/03/15/AIA094/20150315_001402_1024_0094.jpg" if (pictureimg.load (strPath))
{
pictureimg = pictureimg.scaled (mWidth, mHeight, Qt::KeepAspectRatio);
} return pictureimg;
}
最新文章
- SQL(横表和纵表)行列转换,PIVOT与UNPIVOT的区别和使用方法举例,合并列的例子
- HTML5-01 简介
- Map循环的三种方法
- 解决PowerShell命令行窗口中不显示光标的问题
- [转]AngularJS fixed header scrollable table directive
- linux C之getchar()非阻塞方式
- 一个Chrome拓展——HttpPost
- Maven的安装
- CKeditor3.6.2 配置与精简
- 【leetcode】7. Reverse Integer
- hdu5792--World is Exploding
- 01-Objective-C
- OpenGL —— 基础笔记
- 自学JQuery Mobile的几个例子
- jsp静态化之简单介绍
- HBuilder CSS 自定义代码块
- EconomicIndoor集成测试
- 2018.5.17 memcached
- Go基础系列:惰性数值生成器
- EOS 帐户权限操作--你找不到的干货 (原创) 续集-EOS 3.0
热门文章
- 解决commBind: Cannot bind socket FD 18 to [::1]: (99) Cannot assign requested address squid
- Http协议基础内容
- 使用Storm进行词频统计
- Spring MVC-从零开始-view-forward、redirect
- Idea 配置Jrebel热部署
- 对vue nextTick深入理解-vue性能优化、DOM更新时机、事件循环机制
- 链表常见的题型(java实现)
- node学习笔记(二)流和缓冲区
- ELK系列(一):安装(elasticsearch + logstash + kibana)
- ng-cli新建项目