1. 字体不要跟着变大小,那就要使用setPixe,不要使用setPointSize

2. 图片可设置QPixmap::setDevicePixelRatio

http://doc.qt.io/qt-5/qpixmap.html#setDevicePixelRatio

http://doc.qt.io/qt-5/qpainter.html#drawing-high-resolution-versions-of-pixmaps-and-images

3. 图片通过QLabel来显示的时候,试试:

QLabel::setScaledContents(true);

http://doc.qt.io/qt-5/qlabel.html#scaledContents-prop

4. 其它参考文章:

http://my.oschina.net/u/219482/blog/296027

5. 一种资源文件*2的方法(也是官方推荐的方法):

https://tano.si/2013/10/26/how-to-support-retina-screens-in-qt/

相关文章:

  • 2022-12-23
  • 2021-08-17
  • 2021-12-08
  • 2021-09-25
  • 2021-11-04
  • 2021-07-13
  • 2021-06-16
  • 2022-12-23
猜你喜欢
  • 2021-10-19
  • 2021-09-14
  • 2021-06-11
  • 2021-05-20
  • 2021-10-27
  • 2022-12-23
  • 2021-07-02
相关资源
相似解决方案