May 1, 2012

dFrontia dFrontia
Lab Rat
8 posts

How to programming, like a card shuffle.

 

Hi.

One Region has same Rectangle.
The rectangle can flicking in parallel time.

Do not you know such a sample?

I tried programming to use Flicable on GridView.
but Flicable overriding other Flicable. So,Could not control well.

below code is delegate component of GridView.
Can’t reach touch signal to Flicable…

  1. Flickable{
  2.     id : f1
  3.     anchors.fill: parent
  4.  
  5.     interactive: false
  6.  
  7.     contentWidth: 1000
  8.     contentHeight: 1000
  9.         contentX: 500
  10.         contentY: 500
  11.        
  12.         Rectangle{
  13.             id:rect
  14.             x: 500
  15.             y: 500
  16.             width: 200
  17.             height: 200
  18.             color: "#ff0000"
  19.  
  20.             Text{
  21.                 text:f1.interactive
  22.             }
  23.  
  24.             MouseArea{
  25.                 anchors.fill: parent
  26.                 onPressed: {
  27.                    f1.interactive = true      <- Important point!!
  28.                 }
  29.                 onReleased: {
  30.                     f1.interactive = false
  31.                 }
  32.             }
  33.         }
  34.     }

Do not you know how to solve?

regards
dFrontia.

1 reply

May 2, 2012

dFrontia dFrontia
Lab Rat
8 posts

Resolve It.

Not use Flickable Element.

Use a MouseArea custom to Fisica.(Mousearea whith in Inertia )

Sample has here… [quicking.wordpress.com]

 
  ‹‹ Why does QtQuick does not have TouchArea (like MouseArea) ?      Can’t build qml example in eclipse ››

You must log in to post a reply. Not a member yet? Register here!