diff options
author | Kai Köhne <kai.koehne@qt.io> | 2023-05-05 16:05:30 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-06-07 11:07:17 +0000 |
commit | 555dbc0ae0f28b5062228d09217e20153844303e (patch) | |
tree | 7f9218975b7f8fcf864c38ab768adc41b3896955 | |
parent | 393856db16a56d2fab8df4fb40dd109c656171d1 (diff) |
pbr-materials: Fix runtime warning
Fixes
qt.qml.context: qrc:/BasicCamera.qml:14:5 Parameter "aspectRatio" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
Change-Id: I51f8e912c41c96fdd10c9fe633ec2be3e52a8ecc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 5551d97a06b08f8f1e7b75bc93fbcc14ff734881)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | examples/qt3d/pbr-materials/BasicCamera.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/qt3d/pbr-materials/BasicCamera.qml b/examples/qt3d/pbr-materials/BasicCamera.qml index eab086b32..77736f953 100644 --- a/examples/qt3d/pbr-materials/BasicCamera.qml +++ b/examples/qt3d/pbr-materials/BasicCamera.qml @@ -11,7 +11,7 @@ Camera { projectionType: CameraLens.PerspectiveProjection fieldOfView: 22.5 aspectRatio: _window.width / _window.height - onAspectRatioChanged: console.log( "aspectRatio = " + aspectRatio ) + onAspectRatioChanged: function(aspectRatio) { console.log( "aspectRatio = " + aspectRatio ) } nearPlane: 0.01 farPlane: 1000.0 viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) |