[Qt-qml] Tile map widget

Cornelius Hald hald at icandy.de
Wed Sep 29 22:42:00 CEST 2010


Hi,

On Wed, 2010-09-29 at 15:01 -0300, Eduardo Fleury wrote:
> Hi
> 
> On Wed, Sep 29, 2010 at 10:31 AM, Cornelius Hald <hald at icandy.de>
> wrote:
>         
>         
>         Answering that one to myself: There are no public headers for
>         QDeclarativeFlickable. Therefore I probably shouldn't subclass
>         it :/
> 
> Indeed, this is not possible.

Thats a pity...

> Alternative solutions are to either 1) handle mouse events yourself,
> or 2) use both a map widget _and_ a flickable widget, the latter being
> used to feed the former with the geometry to be drawn.

I'm currently looking at option 1) but reimplementing the whole kinetic
scrolling is a bit of a pain :)

How do you think option 2) could work? I probably can't create a
flickable in 1:1 map size. Maybe I could create a small flickable and
use it to get the relative movements. After each flick I could recenter
it, that way I could reuse the algorithms for acceleration,
deceleration, etc. Is that what you where thinking about?

Thanks!
Conny






More information about the Qt-qml mailing list