有没有办法用QGraphicsWebView或QWebView改变高宽比?问题是液晶显示屏(800x480)有非方形像素,因此网页显示不正确,例如圆圈变成椭圆形。该软件用于Xorg的Linux中,但是图形驱动程序没有设置高宽比的选项,它是一个非常简单的框架缓冲区。
谢谢你的想法!
发布于 2017-11-21 19:12:03
我正在复制康斯坦丁·托卡雷夫( Konstantin Tokarev )在forum.qt.io上提供的答案:
There are at least two ways to do this:
In user style sheet set transform: scaleX(...) (or scaleY) for html element. Use prefixed version -webkit-tranform if you don't use QtWebKit 5.212
Use QGraphicsView::scale with different values for x and y (if using QGraphicsWebView)
Note that performance may decrease because of scaling原版:https://forum.qt.io/topic/85209/screen-aspect-ratio-and-qwebview
https://stackoverflow.com/questions/47361832
复制相似问题