2022-05-13 13:12:05 +00:00
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
2011-11-16 14:39:45 +00:00
2012-07-30 09:09:23 +00:00
//! [1]
2022-08-31 07:59:05 +00:00
import QtQuick
import OpenGLUnderQML
2011-11-16 14:39:45 +00:00
Item {
2012-02-29 07:40:39 +00:00
width: 320
height: 480
2011-11-16 14:39:45 +00:00
Squircle {
SequentialAnimation on t {
NumberAnimation { to: 1 ; duration: 2500 ; easing.type: Easing . InQuad }
NumberAnimation { to: 0 ; duration: 2500 ; easing.type: Easing . OutQuad }
loops: Animation . Infinite
running: true
}
}
2012-07-30 09:09:23 +00:00
//! [1] //! [2]
2011-11-16 14:39:45 +00:00
Rectangle {
2012-07-30 09:09:23 +00:00
color: Qt . rgba ( 1 , 1 , 1 , 0.7 )
2011-11-16 14:39:45 +00:00
radius: 10
border.width: 1
border.color: "white"
anchors.fill: label
anchors.margins: - 10
}
Text {
id: label
color: "black"
wrapMode: Text . WordWrap
2023-01-11 09:37:45 +00:00
text: qsTr ( "The background here is a squircle rendered with raw OpenGL using the 'beforeRender()' signal in QQuickWindow. This text label and its border is rendered using QML" )
2011-11-16 14:39:45 +00:00
anchors.right: parent . right
anchors.left: parent . left
anchors.bottom: parent . bottom
anchors.margins: 20
}
}
2012-07-30 09:09:23 +00:00
//! [2]