我试图在QML中制作一个画布,您可以在其中滚动/平移和缩放。我对画布的尺寸有麻烦。当我缩小时,画布的尺寸变小,我在右边和底部得到一个没有画布的区域。我已经尝试了很多,似乎没有任何工作。这是一个QML示例:
<a>The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown The quick brown</a>
<a>fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over fox jumps over </a>
<a>the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. the lazy dog. </a>
这就是画布的样子(画布为红色,白色区域无效):