• 4382阅读
  • 2回复

[提问]关于Flipable,翻转两个界面的动画效果 [复制链接]

上一主题 下一主题
离线ppy_gogo
 

只看楼主 倒序阅读 楼主  发表于: 2014-01-26
我用Flipable做两个界面的反转动画,
Flipable.qml 和a.qml 和 b.qml
但是现在发现两个问题
第一个:翻转到b.qml的时候,a里面的button(鼠标事件)和TextField和combox,效果依然存在,导致b里面的TextField和combox会失灵,不能点击,不能输入。
第二个:我给a.qml内的一个按钮写了一个点击后移动位置的动画,单独运行a是正常的,运行Flipable.qml的时候,就失灵了,点击完全没反应
Flipable.qml
  1. import QtQuick 2.0
  2. import QtQuick.Controls 1.0
  3. import QtQuick.Controls.Styles 1.1
  4. import QtGraphicalEffects 1.0
  5. import QtQuick.Window 2.1
  6. Window{
  7.     maximumWidth : 380
  8.     maximumHeight : 280
  9.     minimumWidth : 380
  10.     minimumHeight : 280
  11.     Flipable {
  12.         id: flipable
  13.         anchors.fill: parent
  14.         anchors.top: parent.top
  15.         anchors.left: parent.left
  16.         property bool flipped: false
  17.         front: Login { anchors.centerIn: parent }
  18.         back: Registration {  anchors.centerIn: parent }
  19.         transform: Rotation {
  20.             id: rotation
  21.             origin.x: flipable.width/2
  22.             origin.y: flipable.height/2
  23.             axis.x: 0; axis.y: 1; axis.z: 0
  24.             angle: 0
  25.         }
  26.         states: State {
  27.             name: "back"
  28.             PropertyChanges { target: rotation; angle: 180 }
  29.             when: flipable.flipped
  30.         }
  31.         transitions: Transition {
  32.             NumberAnimation { target: rotation; property: "angle"; duration: 500 }
  33.         }
  34.     }
  35. }
a.qml和b.qml
里面就是一些ButtonComboBox(可输入的那种),TextField


离线ppy_gogo

只看该作者 1楼 发表于: 2014-02-06
没人给回复那~~~~~~
离线charles_gz

只看该作者 2楼 发表于: 2014-02-28
对于你的第一个问题我想可以通过设置viesible来达到鼠标事件的相应问题,第二个问题应该也是鼠标事件的问题
快速回复
限100 字节
 
上一个 下一个