Qt high DPI
http://doc.qt.io/qt-5/highdpi.html
Qt Support
- Ability to provide pixmaps or artwork for high resolution: see Drawing High Resolution Versions of Pixmaps and Images.
- Qt 5.4 introduces experimental support for scaling by by device pixel ratio similar to OS X to the platform plugins for Windows and Unix (XCB). This is controlled by the environment variable
QT_DEVICE_PIXEL_RATIO. It can be set to a numerical value to be used as scale factor or"auto"which causes the scale factor to be determined by checking the monitor size.It is recommended to use the
Fusionstyle.
Migration of Existing Applications
In order to get an application designed for low DPI values running on a high resolution monitors quickly, consider one of the scaling options (let the application run as DPI Unaware on Windows or set the environment variable QT_DEVICE_PIXEL_RATIO to "auto". These options may incur some scaling or painting artifacts, though.
In the longer term, the application should be adapted to run unmodified:
- Always use the qreal versions of the QPainter drawing API.
- Size windows and dialogs in relation to the screen size.
- Replace hard-coded sizes in layouts and drawing code by values calculated from font metrics or screen size.
Qt high DPI的更多相关文章
- QT的DPI支持
在main函数第一行加入: QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 鼠标不按下也响应移动事件: setMouseTra ...
- Qt之高DPI显示器(一) - 解决方案整理
目录 DPI发展 1.PPI 2.DPI 一.Win自适应系统 二.Qt机制 1.Windows系统DWM缩放 2. Qt适配高DPI 3.适配DPI结论 三.Qt适配 四.自己适配 1.窗口大小 2 ...
- 【Qt开发】【ARM-Linux开发】 QT在ARM上显示字体的问题
在PC机上利用QT开发的应用程序在设置字体时,在PC上运行,可根据自己的设置,字体随之变大或变小.而移植到ARM上运行时发现,显示字体与所设置的字体不用,字体普遍偏小.经过上网搜索发现,是环境变量字库 ...
- blade 已开源
https://github.com/crazii 开源的主要原因是一个人写不动了, 而且已经很久没更新代码了. 希望有人能够感兴趣, 提供贡献. 距离上次更新日志已经很久了, 中间大概加了以下fea ...
- Qt之高DPI显示器(二) - 自适配解决方案分析
目录 一.回顾 二.框架说明 1.ICallDPIChanged 2.IDPIHelper 3.悬浮窗体管理器 三.方案分析 1.窗口大小 2.字体大小 3.间距 4.图标 四.相关文章 原文链接:Q ...
- Qt on Android:创建可伸缩界面
使用 Qt 来开发 Android 应用,也需要适配不同移动设备,适配多种多样的屏幕和分辨率.这次我们大概来讲一下如何使用 Qt 提供的机制来创建可伸缩的界面. DPI 必须要解释一下 DPI . D ...
- 《Qt Quick 4小时入门》学习笔记
http://edu.csdn.net/course/detail/1042/14804?auto_start=1 Qt Quick 4小时入门 第五章:Qt Quick里的信号与槽 QML中 ...
- Qt之坐标系统
简述 坐标系统是由QPainter类控制的,再加上QPaintDevice和QPaintEngine类,就形成了Qt的绘图体系. QPainter:用于执行绘图操作. QPaintDevice:二维空 ...
- 是什么让 Ubuntu 选用 Qt 而不是 GTK?
是什么让 Ubuntu 选用 Qt 而不是 GTK? 一个正在发生的事实,Ubuntu正在不断Qt化!我曾一直在抱怨的Software Center,今日一看源码,竟然有softwarecenter/ ...
随机推荐
- sqlserver行列转换
sqlserver行转列 --创建行转列表及插入数据 create table tb_RowConvertToColumn ( username ) null, course ) null, scor ...
- PHP 如何读取一个1G的文件大小
需求如下: 现有一个1G左右的日志文件,大约有500多万行, 用php返回最后几行的内容. 1. 直接采用file函数来操作 or file_get_content() 肯定报内存溢出注: 由于 fi ...
- url上使用#号好不好
这是一篇摘自百度站长工具的文章. 一般来说,url当中的#号是一个锚点的标志位,这样的url打开之后会将访问者的视线定位在指定位置上,令访问者直接看到网页中间的一段内容.自从推特流行开始,#号被附予了 ...
- in_array()和explode()的使用笔记
今天使用explode函数是因为,在使用in_array()函数时候,in_array()的第二个参数是个数组,bool ( mixed $needle , array $haystack [, bo ...
- htc M8 无法自动恢复数据连接(4g)的问题解决
情况如下:htc m8 tdd-lte的双待手机,4g.2g同时在线. 本月出现,在短时间没有信号的情况后,无法恢复数据连接,哪怕是edge,更不论4g了. 尝试各种方法无解.最后咨询10086解决此 ...
- Java类型相互转换byte[]类型,blob类型
在我们的程序开发当中,经常会用到java.sql.Blob.byte[].InputStream之间的相互转换,但在JDK的API当中,又没有直接给我们提供可用的API,下面的程序片段主要就是实现它们 ...
- HDU 3374 String Problem(KMP+最大/最小表示)
String Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) T ...
- NOJ 1641 错误的算法(模拟)
[1641] 错误的算法 时间限制: 5000 ms 内存限制: 65535 K 问题描述 有道题目是这样的: 输入一个 n 行 m 列网格,找一个格子,使得它所在的行和列中所有格子的数之和最大.如果 ...
- JavaScript编码规范[百度]
JavaScript编码规范 1 前言 2 代码风格 2.1 文件 2.2 结构 2.2.1 缩进 2.2.2 空格 2.2.3 换行 2.2.4 语句 2.3 命名 ...
- java获取MySQL自动的int类型的Id
@Resource(name = "dashboardTemplate") protected JdbcTemplate systemJDBCTemplate; //这个是Dao里 ...