缩放图片

void VCImgWidget::wheelEvent(QWheelEvent *event)
{
if (event->delta() > ) {
// 当滚轮远离使用者时
//ui->textEdit->zoomIn();
// 进行放大
//qDebug() << event->delta();
scale_img = scale_img + 0.1;
}
else {
// 当滚轮向使用者方向旋转时
//ui->textEdit->zoomOut();
// 进行缩小
//qDebug() << event->delta();
if (scale_img>0.3)
{
scale_img = scale_img - 0.1;
}
}
update();
}

最新文章

  1. maven之一:maven安装和eclipse集成
  2. 了解EF CodeFirst的Migrator功能与Migrator.Net对比
  3. Android课程---Activity 带返回值的跳转
  4. C语言错误之--初始值(低级错误)
  5. error opening trace file: No such file or directory (2) ,can&#39;t load transform_config.xml
  6. 011. asp.net内置对象
  7. Linux下gcc和g++编译helloworld
  8. python学习笔记八--动态类型
  9. Linux系统上使用php获取apk信息
  10. 操作hadoop的经验积累
  11. Mobile开发的饕餮盛宴-Zoomla!波CMS2 x2.1正式宣布
  12. 【原生js】原生js的省市区三级联动
  13. TCP carries HTTP data in order, and without corruption
  14. 如何在python脚本开发做code review
  15. Entity Framework 之存储过程篇
  16. 最新vue.js完整视频教程12套
  17. eclipse maven web
  18. H5 37-背景缩写
  19. POJ 2248 - Addition Chains - [迭代加深DFS]
  20. 在Thinkphp中【自动加载自定义扩展配置文件】!

热门文章

  1. Linux操作系统的计划任务
  2. nginx: [error] invalid PID number &quot;&quot; in &quot;/run/nginx.pid&quot;
  3. Environment类在代码中的使用
  4. 关于c++中的类型转换符
  5. 深度学习Keras框架笔记之Dense类(标准的一维全连接层)
  6. python无法导入自己的模块的解决办法
  7. [Codeforces 1242C]Sum Balance
  8. 使用SpringBoot访问jsp页面
  9. L1141
  10. C++ EH Exception(0xe06d7363)---捕获过程