Image {
x: 92.5; y: 27
source: "hour.png"
- smooth: true
transform: Rotation {
id: hourRotation
origin.x: 7.5; origin.y: 73;
Image {
x: 93.5; y: 17
source: "minute.png"
- smooth: true
transform: Rotation {
id: minuteRotation
origin.x: 6.5; origin.y: 83;
Image {
x: 97.5; y: 20
source: "second.png"
- smooth: true
transform: Rotation {
id: secondRotation
origin.x: 2.5; origin.y: 80;
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-Image {
- source: "quit.png"
- scale: quitMouse.pressed ? 0.8 : 1.0
- smooth: quitMouse.pressed
- MouseArea {
- id: quitMouse
- anchors.fill: parent
- anchors.margins: -10
- onClicked: Qt.quit()
- }
-}
source: "gfx/cloud.png"
alphaVariation: 0.25
opacity: 0.25
- smooth: true
}
Wander {
anchors.fill: parent
source: "content/gfx/catch.png"
opacity: 0.25
- smooth: true
}
Wander {
BorderImage {
anchors { fill: container; leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
- source: 'images/box-shadow.png'; smooth: true
+ source: 'images/box-shadow.png'
border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
}
- Image { anchors.fill: parent; source: "images/cardboard.png"; smooth: true }
+ Image { anchors.fill: parent; source: "images/cardboard.png"; antialiasing: true }
Rectangle {
anchors.fill: container; color: container.tint; visible: container.tint != ""
- opacity: 0.25; smooth: true
+ opacity: 0.25
}
- Text { id: labelText; font.pixelSize: 15; anchors.centerIn: parent; smooth: true }
+ Text { id: labelText; font.pixelSize: 15; anchors.centerIn: parent }
MouseArea {
anchors { fill: parent; leftMargin: -20; topMargin: -20; rightMargin: -20; bottomMargin: -20 }
BorderImage {
anchors { fill: container; leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
- source: 'images/box-shadow.png'; smooth: true
+ source: 'images/box-shadow.png';
border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
}
- Image { anchors.fill: parent; source: "images/cardboard.png"; smooth: true }
+ Image { anchors.fill: parent; source: "images/cardboard.png"; antialiasing: true }
TextInput {
- id: textInput; text: label; font.pixelSize: 15; anchors.centerIn: parent; smooth: true
+ id: textInput; text: label; font.pixelSize: 15; anchors.centerIn: parent
Keys.onReturnPressed: {
container.label = textInput.text
container.focus = true
Rectangle {
anchors.fill: container; border.color: "steelblue"; border.width: 4
- color: "transparent"; visible: textInput.focus; smooth: true
+ color: "transparent"; visible: textInput.focus; antialiasing: true
}
MouseArea {
fill: originalImage.status == Image.Ready ? border : placeHolder
leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8
}
- source: 'images/box-shadow.png'; smooth: true
+ source: 'images/box-shadow.png'
border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
}
Rectangle {
property int h: Script.getHeight(content)
property double s: Script.calculateScale(w, h, photoWrapper.width)
- color: 'white'; anchors.centerIn: parent; smooth: true
+ color: 'white'; anchors.centerIn: parent; antialiasing: true
width: w * s; height: h * s; visible: originalImage.status != Image.Ready
Rectangle {
- color: "#878787"; smooth: true
+ color: "#878787"; antialiasing: true
anchors { fill: parent; topMargin: 3; bottomMargin: 3; leftMargin: 3; rightMargin: 3 }
}
}
Rectangle {
- id: border; color: 'white'; anchors.centerIn: parent; smooth: true
+ id: border; color: 'white'; anchors.centerIn: parent; antialiasing: true
width: originalImage.paintedWidth + 6; height: originalImage.paintedHeight + 6
visible: !placeHolder.visible
}
BusyIndicator { anchors.centerIn: parent; on: originalImage.status != Image.Ready }
Image {
- id: originalImage; smooth: true; source: "http://" + Script.getImagePath(content); cache: false
+ id: originalImage; antialiasing: true;
+ source: "http://" + Script.getImagePath(content); cache: false
fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height
}
Image {
- id: hqImage; smooth: true; source: ""; visible: false; cache: false
+ id: hqImage; antialiasing: true; source: ""; visible: false; cache: false
fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height
}
Binding {
source: "../../images/finalfrontier.png"
transformOrigin: Item.Center
anchors.centerIn: parent
- smooth: true
NumberAnimation on rotation {
from: 0
to: 360
Image {
id: rocketShip
source: "../../images/rocket.png"
- smooth: true
anchors.centerIn: holder
rotation: (circle.percent+0.25) * 360
z: 2
//! [vertex]
property variant source: theSource
property variant blurred: ShaderEffectSource {
- smooth: true
sourceItem: ShaderEffect {
width: theItem.width
height: theItem.height
property variant delta: Qt.size(0.0, 1.0 / height)
property variant source: ShaderEffectSource {
- smooth: true
sourceItem: ShaderEffect {
width: theItem.width
height: theItem.height
color: "ivory"
border.color: "orange"
radius: 5
+ antialiasing: true
}
Image {
anchors.fill:parent
Rectangle {
id: container
border.width: 2
+ antialiasing: true
property real myRand: Math.random();//'depth'
z: Math.floor(myRand * 100)
scale: (myRand + 1.0)/2;
Image {
id: img
anchors.centerIn: parent
- smooth: true; source: "http://" + Script.getImagePath(content); cache: true
+ antialiasing: true;
+ source: "http://" + Script.getImagePath(content); cache: true
fillMode: Image.PreserveAspectFit;
width: parent.width-4; height: parent.height-4
onStatusChanged: if (img.status == Image.Ready) {
height: text.height + 10; width: text.width + 20
border.width: 1
radius: 4
- smooth: true
+ antialiasing: true
gradient: Gradient {
GradientStop {
source: image
opacity: onLand ? 1 : 0.25
scale: Math.max((y + height - 250) * 0.01, 0.3)
- smooth: true
onCreatedChanged: {
if (created && !onLand)
Image {
x: 92.5; y: 27
source: "hour.png"
- smooth: true
transform: Rotation {
id: hourRotation
origin.x: 7.5; origin.y: 73;
Image {
x: 93.5; y: 17
source: "minute.png"
- smooth: true
transform: Rotation {
id: minuteRotation
origin.x: 6.5; origin.y: 83;
anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom; anchors.margins: 10
width: buttonText.width + 10; height: buttonText.height + 10
border.width: mouseArea.pressed ? 2 : 1
- radius : 5; smooth: true
+ radius : 5; antialiasing: true
Text { id: buttonText; anchors.centerIn: parent; text: "Request data.xml" }
border.width: 2
border.color: "black";
radius: 10
+ antialiasing: true
Text {
id: buttonText
text: parent.description
anchors.centerIn: parent
font.pixelSize: parent.height * .5
- style: Text.Sunken; color: "white"; styleColor: "black"; smooth: true
+ style: Text.Sunken; color: "white"; styleColor: "black"
}
MouseArea {
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-Image {
- source: "quit.png"
- scale: quitMouse.pressed ? 0.8 : 1.0
- smooth: quitMouse.pressed
- MouseArea {
- id: quitMouse
- anchors.fill: parent
- anchors.margins: -10
- onClicked: Qt.quit()
- }
-}
****************************************************************************/
import QtQuick 2.0
-import "content"
Rectangle {
id: window
Rectangle {
id: slot1; color: "#121212"; x: 30; height: 46; width: 46
- border.color: "#343434"; border.width: 1; radius: 12
+ border.color: "#343434"; border.width: 1; radius: 12; antialiasing: true
anchors.verticalCenter: parent.verticalCenter
}
Rectangle {
id: slot2; color: "#121212"; x: window.width - 76; height: 46; width: 46
- border.color: "#343434"; border.width: 1; radius: 12
+ border.color: "#343434"; border.width: 1; radius: 12; antialiasing: true
anchors.verticalCenter: parent.verticalCenter
}
Rectangle {
id: rect; x: 30; color: "#454545"
border.color: "White"; border.width: 2
- height: 46; width: 46; radius: 12
+ height: 46; width: 46; radius: 12; antialiasing: true
anchors.verticalCenter: parent.verticalCenter
MouseArea {
Canvas {
id: canvas
anchors.fill: parent
- smooth: true
+ antialiasing: true
onPaint: {
var context = canvas.getContext("2d")
x: 25; y: 25
width: 50; height: 50
border.width: 1
- smooth: true
+ antialiasing: true
Text {
anchors.centerIn: parent
Canvas {
id: canvas
anchors.fill: parent
- smooth: true
+ antialiasing: true
onPaint: {
var context = canvas.getContext("2d")
width: 50; height: 50
border.width: 1
- smooth: true
+ antialiasing: true
//bind our attributes to follow the path as progress changes
x: motionPath.x
property real scaleX : scaleXCtrl.value
property real scaleY : scaleYCtrl.value
property real rotate : rotateCtrl.value
- smooth:true
-
+ antialiasing: true
Behavior on scaleX { SpringAnimation { spring: 2; damping: 0.2; loops:Animation.Infinite } }
Behavior on scaleY { SpringAnimation { spring: 2; damping: 0.2; loops:Animation.Infinite} }
property real py:yCtrl.value
property real alpha:alphaCtrl.value
property string imagefile:"../contents/qt-logo.png"
- smooth:true
+ antialiasing: true
Component.onCompleted:loadImage(canvas.imagefile);
onAlphaChanged:requestPaint();
property real scaleX : scaleXCtrl.value
property real scaleY : scaleYCtrl.value
property real rotate : rotateCtrl.value
- smooth:true
+ antialiasing: true
onLineWidthChanged:requestPaint();
onFillChanged:requestPaint();
id:canvas
width:320
height:280
- smooth:true
+ antialiasing: true
property int radius: rCtrl.value
property int rectx: rxCtrl.value
id:canvas
width:320
height:280
- smooth:true
+ antialiasing: true
property string strokeStyle:"green"
property string fillStyle:"yellow"
id:canvas
width:320
height:250
- smooth:true
+ antialiasing: true
property string strokeStyle:"blue"
property string fillStyle:"steelblue"
id:canvas
width:320
height:280
- smooth:true
+ antialiasing: true
property string strokeStyle:"steelblue"
property string fillStyle:"yellow"
property bool fill:true
Image {
id: needle
x: 98; y: 33
- smooth: true
+ antialiasing: true
source: "needle.png"
transform: Rotation {
id: needleRotation
Image {
source: "quit.png"
scale: quitMouse.pressed ? 0.8 : 1.0
- smooth: quitMouse.pressed
MouseArea {
id: quitMouse
anchors.fill: parent
radius: 8
opacity: 0.7
- smooth: true
+ antialiasing: true
gradient: Gradient {
GradientStop { position: 0.0; color: "gray" }
GradientStop { position: 1.0; color: "white" }
id: slider
x: 1; y: 1; width: 30; height: 14
radius: 6
- smooth: true
+ antialiasing: true
gradient: Gradient {
GradientStop { position: 0.0; color: "#424242" }
GradientStop { position: 1.0; color: "black" }
width: front.width; height: front.height
- front: Image { id: frontImage; smooth: true }
- back: Image { source: "back.png"; smooth: true }
+ front: Image { id: frontImage }
+ back: Image { source: "back.png" }
state: "back"
Image {
id: moon
- smooth: true
anchors.centerIn: parent
scale: moonArea.pressed ? 1.1 : 1.0
opacity: moonArea.containsMouse ? 1.0 : 0.7
verticalCenterOffset: 30
horizontalCenterOffset: 80
}
- smooth: true
scale: rightCloudArea.pressed ? 1.1 : 1.0
opacity: rightCloudArea.containsMouse ? 1.0 : 0.7
source: Qt.resolvedUrl("images/cloud_2.png")
verticalCenterOffset: 40
horizontalCenterOffset: -80
}
- smooth: true
scale: leftCloudArea.pressed ? 1.1 : 1.0
opacity: leftCloudArea.containsMouse ? 1.0 : 0.7
source: Qt.resolvedUrl("images/cloud_1.png")
width: parent.width; height: parent.height - captionItem.height
source: "qt-logo.png"
clip: true // only makes a difference if mode is PreserveAspectCrop
- smooth: true
}
Text {
anchors.fill: rectangle
anchors { leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
border { left: 10; top: 10; right: 10; bottom: 10 }
- source: "shadow.png"; smooth: true
+ source: "shadow.png"
}
//! [shadow]
Rectangle {
id: content
color: "transparent"
- smooth: true
+ antialiasing: true
anchors.fill: parent; anchors.margins: 20; radius: 10
- Rectangle { color: "#91AA9D"; anchors.fill: parent; anchors.margins: 3; radius: 8; smooth: true }
- Image { source: "images/qt-logo.png"; anchors.centerIn: parent; smooth: true }
+ Rectangle { color: "#91AA9D"; anchors.fill: parent; anchors.margins: 3; radius: 8; antialiasing: true }
+ Image { source: "images/qt-logo.png"; anchors.centerIn: parent }
}
MouseArea {
id: content
anchors.centerIn: parent; width: container.width - 40; height: container.height - 10
color: "transparent"
- smooth: true
+ antialiasing: true
radius: 10
- Rectangle { anchors.fill: parent; anchors.margins: 3; color: "#91AA9D"; smooth: true; radius: 8 }
+ Rectangle { anchors.fill: parent; anchors.margins: 3; color: "#91AA9D"; antialiasing: true; radius: 8 }
}
Text {
signal clicked
width: label.width + 20; height: label.height + 6
- smooth: true
+ antialiasing: true
radius: 10
gradient: Gradient {
Image {
x: 92.5; y: 27
source: "hour.png"
- smooth: true
transform: Rotation {
id: hourRotation
origin.x: 7.5; origin.y: 73;
Image {
x: 93.5; y: 17
source: "minute.png"
- smooth: true
transform: Rotation {
id: minuteRotation
origin.x: 6.5; origin.y: 83;
Image {
x: 97.5; y: 20
source: "second.png"
- smooth: true
transform: Rotation {
id: secondRotation
origin.x: 2.5; origin.y: 80;
Image {
id: image
source: modelData.icon
- smooth: true
scale: 0.8
}
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-Image {
- source: "quit.png"
- scale: quitMouse.pressed ? 0.8 : 1.0
- smooth: quitMouse.pressed
- MouseArea {
- id: quitMouse
- anchors.fill: parent
- anchors.margins: -10
- onClicked: Qt.quit()
- }
-}
id: myIcon
y: 20; anchors.horizontalCenter: parent.horizontalCenter
source: icon
- smooth: true
}
Text {
anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter }
text: name
- smooth: true
}
MouseArea {
ShaderEffectSource {
id: theSource
sourceItem: theItem
- smooth: true
}
//! [source]
width: 160
height: 140
source: "content/qt-logo.png"
- smooth: true
}
Image {
width: 160
height: 140
source: "content/face-smile.png"
- smooth: true
}
}
}
height: 160
property variant source: theSource
property variant shadow: ShaderEffectSource {
- smooth: true
sourceItem: ShaderEffect {
width: theItem.width
height: theItem.height
property variant delta: Qt.size(0.0, 1.0 / height)
property variant source: ShaderEffectSource {
- smooth: true
sourceItem: ShaderEffect {
width: theItem.width
height: theItem.height
color: "white"
text: "Hello world!"
font.pixelSize: 32
- smooth: true
//! [letterspacing]
SequentialAnimation on font.letterSpacing {
x: 8 + -width * 0.6 / 2; y: -20
source: "note-yellow.png"
scale: 0.6; transformOrigin: Item.TopLeft
- smooth: true
}
TextEdit {
id: myText
x: -104; y: 36; width: 215; height: 200
- smooth: true
font.pixelSize: 24
readOnly: false
rotation: -8
//set appearance properties
radius: 6
- smooth: true
+ antialiasing: true
border { width: 2; color: borderColor }
width: buttonWidth; height: buttonHeight
Rectangle {
id: dirBox
radius: 10
+ antialiasing: true
anchors.centerIn:parent
height: parent.height -15; width: parent.width -30
id:header
height: parent.height*0.1; width: parent.width
radius:3
+ antialiasing: true
z:1
gradient: Gradient {
GradientStop { position: 0.0; color: "#8C8F8C" }
width: parent.width; height: parent.height
anchors.centerIn: parent
radius: 10
- smooth: true
+ antialiasing: true
scale: GridView.view.currentIndex == index ? 1 : 0.5
opacity: GridView.view.currentIndex == index ? 1 : 0
Text {
color: "#696167"
font.weight: Font.DemiBold
font.pointSize: 12
- smooth: true
elide: Text.ElideMiddle
horizontalAlignment: Text.AlignHCenter
}
text: "menu: "
color: "lightblue"
font { weight: Font.Light; italic: true }
- smooth: true
}
//row displays its children in a vertical row
Row {
scale: menuListView.currentIndex == 0? 1.25: 1
labelSize: menuListView.currentIndex == 0? 16:12
radius: 1
- smooth:true
//on a button click, change the list's currently selected item to FileMenu
onButtonClick: menuListView.currentIndex = 0
gradient: Gradient {
label: "Edit"
radius: 1
labelSize: menuListView.currentIndex == 1? 16:12
- smooth:true
//on a button click, change the list's currently selected item to EditMenu
onButtonClick: menuListView.currentIndex = 1
gradient: Gradient {
//set appearance properties
radius: 10
- smooth: true
+ antialiasing: true
border{color: "white"; width: 3}
width: buttonWidth; height: buttonHeight
//set appearance properties
radius:10
- smooth: true
+ antialiasing: true
border{color: "white"; width: 3}
width: buttonWidth; height: buttonHeight
//set appearance properties
radius:10
- smooth: true
+ antialiasing: true
border{color: "white"; width: 3}
width: buttonWidth; height: buttonHeight
//set appearance properties
radius:10
- smooth: true
+ antialiasing: true
border.color: "white"
border.width: 3
width: buttonWidth; height: buttonHeight
property real labelSize: 14
//set appearance properties
radius:6
- smooth: true
+ antialiasing: true
border.width: 2
border.color: borderColor
width: buttonWidth; height: buttonHeight
Rectangle{
id: dirBox
radius: 10
+ antialiasing: true
anchors.centerIn:parent
height: parent.height -15; width: parent.width -30
height:parent.height*0.1
width: parent.width
radius:3
+ antialiasing: true
z:1
gradient: Gradient {
GradientStop { position: 0.0; color: "#8C8F8C" }
width:parent.width; height:parent.height
anchors.centerIn: parent
radius: 10
- smooth: true
+ antialiasing: true
scale: GridView.view.currentIndex == index ? 1 : 0.5
opacity: GridView.view.currentIndex == index ? 1 : 0
Text{
color: "#696167"
font.weight: Font.DemiBold
font.pointSize: 12
- smooth:true
elide: Text.ElideMiddle
horizontalAlignment: Text.AlignHCenter
}
text: "menu: "
color: "lightblue"
font {weight: Font.Light; italic: true}
- smooth: true
}
//row displays its children in a vertical row
scale: menuListView.currentIndex == 0? 1.25: 1
labelSize: menuListView.currentIndex == 0? 16:12
radius: 1
- smooth:true
//on a button click, change the list's currently selected item to FileMenu
onButtonClick: menuListView.currentIndex = 0
gradient: Gradient{
label: "Edit"
radius: 1
labelSize: menuListView.currentIndex == 1? 16:12
- smooth:true
//on a button click, change the list's currently selected item to EditMenu
onButtonClick: menuListView.currentIndex = 1
gradient: Gradient{
width: buttonLabel.width + 20; height: buttonLabel.height + 5
border { width: 1; color: Qt.darker(activePalette.button) }
- smooth: true
+ antialiasing: true
radius: 8
// color the button with a gradient
width: buttonLabel.width + 20; height: buttonLabel.height + 5
border { width: 1; color: Qt.darker(activePalette.button) }
- smooth: true
+ antialiasing: true
radius: 8
// color the button with a gradient
width: buttonLabel.width + 20; height: buttonLabel.height + 5
border { width: 1; color: Qt.darker(activePalette.button) }
- smooth: true
+ antialiasing: true
radius: 8
// color the button with a gradient
width: buttonLabel.width + 20; height: buttonLabel.height + 5
border { width: 1; color: Qt.darker(activePalette.button) }
- smooth: true
+ antialiasing: true
radius: 8
// color the button with a gradient
width: 100; height: 30
border.width: 1
radius: 5
- smooth: true
+ antialiasing: true
gradient: Gradient {
GradientStop { position: 0.0; color: "darkGray" }
//! [properties]
width: 145; height: 60
color: "blue"
- smooth: true; radius: 9
+ antialiasing: true; radius: 9
property alias text: label.text
//! [properties]
//! [object alias]
//! [properties]
width: 145; height: 60
color: "blue"
- smooth: true; radius: 9
+ antialiasing: true; radius: 9
property alias text: label.text
//! [properties]
border {color: "#B9C5D0"; width: 1}
Rectangle {
id: rectangle
anchors.centerIn: parent
- color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
+ color: "lightsteelblue"; width: 175; height: 25; radius: 10; antialiasing: true
Text { id: label; anchors.centerIn: parent }
focus: true
Keys.onPressed: {
//! [mywidget]
Rectangle {
id: widget
- color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
+ color: "lightsteelblue"; width: 175; height: 25; radius: 10; antialiasing: true
Text { id: label; anchors.centerIn: parent}
focus: true
Keys.onPressed: {
Rectangle {
id: rectangle
anchors.centerIn: parent
- color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
+ color: "lightsteelblue"; width: 175; height: 25; radius: 10; antialiasing: true
Text { id: label; anchors.centerIn: parent }
focus: true
Keys.onPressed: {
//![standalone]
SequentialAnimation {
- PropertyAction { target: img; property: "smooth"; value: "true" }
+ PropertyAction { target: img; property: "opacity"; value: .5 }
NumberAnimation { target: img; property: "width"; to: 300; duration: 1000 }
- PropertyAction { target: img; property: "smooth"; value: "false" }
+ PropertyAction { target: img; property: "opacity"; value: 1 }
}
//![standalone]
}
Image {
source: "pics/qt.png"
transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 18 }
- smooth: true
}
Image {
source: "pics/qt.png"
transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 36 }
- smooth: true
}
Image {
source: "pics/qt.png"
transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 54 }
- smooth: true
}
Image {
source: "pics/qt.png"
transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 72 }
- smooth: true
}
}
//! [0]
id: rect
width: 150; height: 100; anchors.centerIn: parent
color: "red"
- smooth: true
+ antialiasing: true
states: State {
name: "rotated"
The \l{declarative/imageelements/borderimage}{BorderImage example} shows how a BorderImage
can be used to simulate a shadow effect on a rectangular item.
- \section1 Quality and Performance
-
- By default, any scaled regions of the image are rendered without smoothing to improve
- rendering speed. Setting the \l smooth property improves rendering quality of scaled
- regions, but may slow down rendering.
+ \section1 Image Loading
The source image may not be loaded instantaneously, depending on its original location.
Loading progress can be monitored with the \l progress property.
/*!
\qmlproperty bool QtQuick2::BorderImage::smooth
- Set this property if you want the image to be smoothly filtered when scaled or
- transformed. Smooth filtering gives better visual quality, but is slower. If
- the image is displayed at its natural size, this property has no visual or
- performance effect.
-
- By default, this property is set to false.
+ This property holds whether the image is smoothly filtered when scaled or
+ transformed. Smooth filtering gives better visual quality, but it may be slower
+ on some hardware. If the image is displayed at its natural size, this property
+ has no visual or performance effect.
- \note Generally scaling artifacts are only visible if the image is stationary on
- the screen. A common pattern when animating an image is to disable smooth
- filtering at the beginning of the animation and enable it at the conclusion.
+ By default, this property is set to true.
*/
/*!
\qml
Image {
width: 130; height: 100
- smooth: true
source: "qtlogo.png"
}
\endqml
Image {
width: 130; height: 100
fillMode: Image.PreserveAspectFit
- smooth: true
source: "qtlogo.png"
}
\endqml
Image {
width: 130; height: 100
fillMode: Image.PreserveAspectCrop
- smooth: true
source: "qtlogo.png"
clip: true
}
Image {
width: 120; height: 120
fillMode: Image.TileVertically
- smooth: true
source: "qtlogo.png"
}
\endqml
Image {
width: 120; height: 120
fillMode: Image.TileHorizontally
- smooth: true
source: "qtlogo.png"
}
\endqml
/*!
\qmlproperty bool QtQuick2::Image::smooth
- Set this property if you want the image to be smoothly filtered when scaled or
- transformed. Smooth filtering gives better visual quality, but is slower. If
- the image is displayed at its natural size, this property has no visual or
- performance effect.
+ This property holds whether the image is smoothly filtered when scaled or
+ transformed. Smooth filtering gives better visual quality, but it may be slower
+ on some hardware. If the image is displayed at its natural size, this property has
+ no visual or performance effect.
- \note Generally scaling artifacts are only visible if the image is stationary on
- the screen. A common pattern when animating an image is to disable smooth
- filtering at the beginning of the animation and reenable it at the conclusion.
+ By default, this property is set to true.
*/
/*!
property variant source: Image {
source: "qt-logo.png"
sourceSize { width: 200; height: 200 }
- smooth: true
}
vertexShader: "
uniform highp mat4 qt_Matrix;
which is the case for most embedded graphics chips, edges rendered
inside a ShaderEffectSource will not be antialiased. One way to remedy
this is to double the size of the effect source and render it with
- \c {smooth: true}. This will be equivalent to 4x multisampling, at
- the cost of lower performance and higher memory use.
+ \c {smooth: true} (this is the default value of smooth).
+ This will be equivalent to 4x multisampling, at the cost of lower performance
+ and higher memory use.
\warning In most cases, using a ShaderEffectSource will decrease
performance, and in all cases, it will increase video memory usage.
It is useful for setting non-animated property values during an animation.
For example, here is a SequentialAnimation that sets the image's
- \l {Image::}{smooth} property to \c true, animates the width of the image,
- then sets \l {Image::}{smooth} back to \c false:
+ \l {Item::}{opacity} property to \c .5, animates the width of the image,
+ then sets \l {Item::}{opacity} back to \c 1:
\snippet qml/propertyaction.qml standalone