aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/shapes/ellipticalArcs.qml
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-09-01 15:29:26 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-09-22 20:39:52 +0200
commit38ac4b4ec2c08a6ea4ae693514e8c3520eb00c2a (patch)
tree612d64352667aec0150cccbb395f910a9d298ed2 /examples/quick/shapes/ellipticalArcs.qml
parenta15472716dbef63f1e5ad27ee412c2a2408b44e2 (diff)
Shapes example: give each qml file's root item a default size
Each square is resized anyway in shapegallery.qml; but for the sake of running individual examples on the command line with qml, the content being shown should be visible. Without this fix, each item had a 0,0 size by default; but the shapes themselves have their own sizes and are centered in the zero-size root item. But when a window is created, the window system does not allow it to have zero size, so it expands; and then the shape would be centered at the top-left corner, and you could only see part of it. Pick-to: 6.2 Change-Id: I42a537421430aea8233106353e9c2033f5bc5774 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/quick/shapes/ellipticalArcs.qml')
-rw-r--r--examples/quick/shapes/ellipticalArcs.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/quick/shapes/ellipticalArcs.qml b/examples/quick/shapes/ellipticalArcs.qml
index 09cc2c8211..de9379f35e 100644
--- a/examples/quick/shapes/ellipticalArcs.qml
+++ b/examples/quick/shapes/ellipticalArcs.qml
@@ -53,6 +53,8 @@ import QtQuick.Shapes
Rectangle {
color: "lightGray"
+ width: 256
+ height: 256
Shape {
id: shape
width: 220