Marble weirdness

Thiago Macieira thiago at
Tue Jun 4 22:43:29 PDT 2013

On quarta-feira, 5 de junho de 2013 14.16.14, Dirk Hohndel wrote:
> So we implement the virtual mousePressEvent() in our GlobeGPS class.
> Yet we don't get single mouse clicks. They are eaten somewhere else in
> the stack. What we do get is double clicks - even though this is NOT the
> mouseDoubleClickEvent() handler. And then even if we call
> event->accept() at the end of our mousePressEvent() function, a click
> still gets delivered to our parents and the widget does strange
> re-center/zooming things.
> Am I just doing this wrong? Am I expecting the wrong behavior? Is this a
> Fedora bug?

You're not doing anything wrong, nor is this a Fedora bug.

It looks like MarbleWidget installs an event filter on itself instead of 
handling events the proper way (by overriding mousePressEvent, like you did). 
Event filters are called with a higher priority than the event handler itself. 
That's not how I would have designed the code myself, but I also don't know 
the decisions that led to this implementation (it was like that in the first 
commit, "Importing Marble").

However, it looks like there's an input handler class:

Maybe installing a handler of your own will allow you to do what you want?

> PS: background: Linus and I wanted to implement something cute where you
> can get the dives that are shown in the widget selected - or select all
> the dives at a specific dive spot. Simply by clicking on the map :-)

Thiago Macieira - thiago (AT) - thiago (AT)
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the subsurface mailing list