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

Ben Lau xbenlau at gmail.com
Fri Mar 6 19:14:49 CET 2015


On 3 March 2015 at 18:45, Rutledge Shawn <Shawn.Rutledge at theqtcompany.com>
wrote:

>
> 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?
>
>
The application will be frozen in the splash screen. The only message
printed is

"QMetaObject::indexOfSignal: signal visibleChanged(bool) from QQuickWindow
redefined in QQuickWindowQmlImpl"

Verified with Qt 5.4.1

And just tested with Android , it is working.



> > According to the code , it use PinchArea + MouseArea instead of
> PinchArea + Flickable.
>
> There is a Flickable to flick the whole surface in 5.5.
>

oh , you mean the example code in 5.5 dev branch? I just tested with the
code bundled with Qt 5.4.1. It don't contains Flickable.


>
> > 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.
>

But in fact Flickable has provided the "fling" gesture already. And
commonly used in ListView for scrolling.


>
> 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.
>
>
I see. Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150307/79a05487/attachment.html>


More information about the Interest mailing list