代码拉取完成,页面将自动刷新
import QtQuick 2.0
import MainWindow 1.0
import UpMainWindow 1.0
import QtQuick.Window 2.2
Item {
id: rect
anchors.fill: parent
//底层opengl
MainWindow{
id: mainWindow
SequentialAnimation on frame {
NumberAnimation{ to: 200; duration: 5000; easing.type: Easing.Linear }
NumberAnimation{ to: 0; duration: 5000; easing.type: Easing.Linear }
loops: Animation.Infinite
running: true
}
}
//顶层opengl
UpMainWindow{
id: upmainWindow
SequentialAnimation on frame {
NumberAnimation{ to: 200; duration: 5000; easing.type: Easing.Linear }
NumberAnimation{ to: 0; duration: 5000; easing.type: Easing.Linear }
loops: Animation.Infinite
running: true
}
}
//中间层qml
Rectangle {
z: 0
color: Qt.rgba(1, 1, 1, 0.7)
radius: 10
border.width: 1
border.color: "white"
anchors.fill: label
anchors.margins: -10
}
Text {
z: 2
id: label
color: "black"
wrapMode: Text.WordWrap
text: "Opengl 和 Qml 混合编程"
anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: 50
y: 220
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。