[Interest] Alternative way to make photo viewer application for mobile platform

Rutledge Shawn Shawn.Rutledge at theqtcompany.com
Tue Mar 3 11:45:44 CET 2015


On 2 Mar 2015, at 18:38, Ben Lau <xbenlau at gmail.com> wrote:

> 
> On 2 March 2015 at 19:38, Rutledge Shawn <Shawn.Rutledge at theqtcompany.com> wrote:
> 
> 
> Did you try the photosurface example?
> 
> It’s getting some new features in 5.5, because pinch zooming and flicking will both work better on OS X than they have in the past, with a trackpad.  Of course it’s not a typical gallery app for mobile devices, but it does involve using pinching and flicking together.
> 
> 
> Hi Rutledge,
> 
> Thank you for your reply. I have tried the photosurface example on desktop only (It don't work on iOS).

It should be able to run on iOS I think, but being able to read photos from the gallery will be a new feature in 5.5 (because there is no permission to do that by default on iOS).  Is that what you mean doesn’t work?

> According to the code , it use PinchArea + MouseArea instead of PinchArea + Flickable.

There is a Flickable to flick the whole surface in 5.5.

> The combination could support pinching and flicking on mobile. However, it lack of support for physic simulation and function like returnToBound() that provided by Flickable.
> 
> For example , after user has swiped on screen and released the finger, the object should still keep moving in a short time. The time should depend on how fast of the swipe gesture.
> 
> Will it have any existing component that can help to build similar thing without Flickable? 
> 
> I think the returnToBound() function could be made by SpringAnimation but no idea how to implement the physic simulation.

You want to “fling” the photos individually?  That’s an interesting idea, but I don’t think we provide an easy way to do it, since it’s not something most UIs would need.

You might try the Box2D QML bindings.  https://github.com/qml-box2d/qml-box2d

Or you can try using MultiPointTouchArea, which will give you velocity at each touch point, and start an animation when the finger is released.  It might be nice if MouseArea provided drag velocity, but it doesn’t.




More information about the Interest mailing list