1 Star 6 Fork 4

chen227/OpenglAndQml

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.qml 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
chen227 提交于 2018-05-24 13:47 +08:00 . opengl 上层界面追加
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
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chen227/OpenglAndQml.git
git@gitee.com:chen227/OpenglAndQml.git
chen227
OpenglAndQml
OpenglAndQml
master

搜索帮助