简体   繁体   English

Qt 5缩放整个窗口

[英]Qt 5 scaling entire windows

So I have a product presentation tommorow and my designer made our Qt application to be big to fit on a 720p screen... There is no time to properly fix this in a day so I am grasping at straws here but is it somehow possible to just scale everything in the qt window to 75% of the size? 因此,我在明天进行了产品演示,我的设计师使我们的Qt应用程序变得很大,可以安装在720p屏幕上。。。没有时间在一天之内正确解决此问题,因此我在这里抓住了稻草,但是有某种可能只是将qt窗口中的所有内容缩放到大小的75%?

Any help is appreciated! 任何帮助表示赞赏!

If you are using QMake, the link below has instructions about how to declare your Qt application to be non -DPI-aware. 如果您使用的是QMake,则下面的链接提供了有关如何声明您的Qt应用程序不支持 -DPI的说明。 I am not sure what you would do for other build systems. 我不确定您将如何处理其他构建系统。 Then, you could set the environment variables documented there to set a custom scaling factor for the window, and hopefully you can make it be less than 1. I have not tried this so I am not sure if it would work. 然后,您可以设置在那里记录的环境变量来为窗口设置自定义缩放比例,希望您可以使其小于1。我没有尝试过这样做,因此不确定它是否可以工作。

http://doc.qt.io/qt-5/highdpi.html http://doc.qt.io/qt-5/highdpi.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM