diff options
author | Bumjoon Park <[email protected]> | 2023-03-30 16:12:28 +0900 |
---|---|---|
committer | Bumjoon Park <[email protected]> | 2023-04-04 06:09:43 +0000 |
commit | a7248458f7586bfaa923486499fb3bd8d2d83f95 (patch) | |
tree | d1b761d6a55201fe66986d99292d0e3be26e8831 /examples/quick/imageelements/image.qml | |
parent | 47be6f59695998ef2f120045cef16d0e7fa8b705 (diff) |
Imageelements example: Update by coding conventions from official doc
- Fix qmllint warning.
- string are translated.
- JS statements no longer end with semi-colon.
Pick-to: 6.5
Change-Id: I39236ffa20fd1131609f170c64ecb4e68273539a
Reviewed-by: Mitch Curtis <[email protected]>
Diffstat (limited to 'examples/quick/imageelements/image.qml')
-rw-r--r-- | examples/quick/imageelements/image.qml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/quick/imageelements/image.qml b/examples/quick/imageelements/image.qml index 1deaa9827d..11acb51054 100644 --- a/examples/quick/imageelements/image.qml +++ b/examples/quick/imageelements/image.qml @@ -1,12 +1,15 @@ // Copyright (C) 2021 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +pragma ComponentBehavior: Bound import QtQuick Rectangle { width: 320 height: 480 Grid { + id: grid + property int cellWidth: (width - (spacing * (columns - 1))) / columns property int cellHeight: (height - (spacing * (rows - 1))) / rows @@ -18,8 +21,8 @@ Rectangle { spacing: 30 component SizedImageCell: ImageCell { - width: parent.cellWidth - height: parent.cellHeight + width: grid.cellWidth + height: grid.cellHeight } SizedImageCell { |