Qt 图片缩放参数计算
2024-09-07 00:39:31
缩放图片
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();
}
最新文章
- maven之一:maven安装和eclipse集成
- 了解EF CodeFirst的Migrator功能与Migrator.Net对比
- Android课程---Activity 带返回值的跳转
- C语言错误之--初始值(低级错误)
- error opening trace file: No such file or directory (2) ,can&#39;t load transform_config.xml
- 011. asp.net内置对象
- Linux下gcc和g++编译helloworld
- python学习笔记八--动态类型
- Linux系统上使用php获取apk信息
- 操作hadoop的经验积累
- Mobile开发的饕餮盛宴-Zoomla!波CMS2 x2.1正式宣布
- 【原生js】原生js的省市区三级联动
- TCP carries HTTP data in order, and without corruption
- 如何在python脚本开发做code review
- Entity Framework 之存储过程篇
- 最新vue.js完整视频教程12套
- eclipse maven web
- H5 37-背景缩写
- POJ 2248 - Addition Chains - [迭代加深DFS]
- 在Thinkphp中【自动加载自定义扩展配置文件】!
热门文章
- Linux操作系统的计划任务
- nginx: [error] invalid PID number ";"; in ";/run/nginx.pid";
- Environment类在代码中的使用
- 关于c++中的类型转换符
- 深度学习Keras框架笔记之Dense类(标准的一维全连接层)
- python无法导入自己的模块的解决办法
- [Codeforces 1242C]Sum Balance
- 使用SpringBoot访问jsp页面
- L1141
- C++ EH Exception(0xe06d7363)---捕获过程