Warning, /frameworks/kdeclarative/tests/qimageitemtest.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.0 0002 import QtQuick.Layouts 1.1 0003 import QtQuick.Controls 2.15 0004 import org.kde.kquickcontrolsaddons 2.0 as KQCA 0005 0006 //this file should be used via qimageitemtest executable 0007 //unless you want to test isNull 0008 0009 Rectangle { 0010 color: "white" 0011 width: 500 0012 height: 500 0013 0014 RowLayout { 0015 anchors.fill: parent 0016 KQCA.QImageItem { 0017 implicitWidth: 300 0018 implicitHeight: 300 0019 0020 id: image 0021 image: testImage 0022 fillMode: fillModeCombo.currentIndex 0023 } 0024 GridLayout { 0025 columns: 2 0026 Text {text: "fillMode"} 0027 ComboBox { 0028 id: fillModeCombo 0029 model: ListModel{ 0030 ListElement { 0031 display: "Stretch" 0032 } 0033 ListElement { 0034 display: "PreserveAspectFit" 0035 }ListElement { 0036 display: "PreserveAspectCrop" 0037 }ListElement { 0038 display: "Tile" 0039 }ListElement { 0040 display: "TileVertically" 0041 } 0042 ListElement { 0043 display: "TileHorizontally" 0044 } 0045 } 0046 } 0047 0048 Text {text: "isNull:"} 0049 Text {text: image.null} 0050 Text {text: "nativeWidth:"} 0051 Text {text: image.nativeWidth} 0052 Text {text: "nativeHeight:"} 0053 Text {text: image.nativeHeight} 0054 Text {text: "paintedWidth:"} 0055 Text {text: image.paintedWidth} 0056 Text {text: "paintedHeight:"} 0057 Text {text: image.paintedHeight} 0058 0059 Text {text: "rect size is 300x300"} 0060 } 0061 } 0062 }