当前位置: 代码迷 >> 综合 >> 在QML中实现图片翻转的效果
  详细解决方案

在QML中实现图片翻转的效果

热度:51   发布时间:2024-01-22 06:21:32.0

好久没有写blog了,前些日子有点忙,现在稍微闲了一下,开始更新一些成果吧!

借鉴Qt中的扫雷应用程序的代码和前辈们的一些代码示例,贴出一段代码,仅供参考!

首先是,翻转效果的实现文件!

 //FlicpableCard.qml

import QtQuick 1.1
 
 
Flipable {
  
    id: container
    property alias frontImage: frontCard.source
    property alias backImage: backCard.source
    property bool flipped: true
    property int xAxis: 0
    property int yAxis: 0
    property int angle: 0
 
 
    width: front.width; height: front.height
    front: Image
  相关解决方案