• QLable 显示图片


    1,各种对就是不显示,因为路径中有其它符号如 什么的

     1 QStringList FileOpeartion::PathCombine (const QString strPath, QStringList strListTemp)
     2 {
     3     QStringList strReturn;
     4     
     5     foreach (const QString &str, strListTemp)
     6     {
     7         if (!str.isEmpty())
     8         {
     9             strReturn << strPath.trimmed() + str.trimmed();
    10         }
    11     }
    12     
    13     return strReturn;
    14 }
    15 
    16 
    17 QPixmap FileOpeartion::GetPicture (QString strPath, int mWidth, int mHeight)
    18 {
    19     QPixmap pictureimg;
    20     //"D:dataFolder/2015/03/15/AIA094/20150315_001402_1024_0094.jpg"
    21     
    22     if (pictureimg.load (strPath))
    23     {
    24         pictureimg = pictureimg.scaled (mWidth, mHeight, Qt::KeepAspectRatio);
    25     }
    26     
    27     return pictureimg;
    28 }
    View Code
  • 相关阅读:
    mysql读写分离
    mysql主从同步
    扫描与抓包
    加密与入侵检查
    监控
    selinux
    预期交互
    python发送邮件
    linux下安装虚拟环境
    博弈论
  • 原文地址:https://www.cnblogs.com/ants_double/p/5883773.html
Copyright © 2020-2023  润新知