Re: [Interest] QtLocation MapPolyLine and MouseArea

2019-03-07 Thread maitai
Thanks Shawn, that looks the best approach, I 'll give it a try. Le 07-03-2019 20:29, Shawn Rutledge a écrit : On 7 Mar 2019, at 18:32, maitai wrote: Hi, I need to trigger various actions whenever a MapPolyLine is hovered or pressed, such as displaying a tooltip, a menu, etc. I have put a

Re: [Interest] QtLocation MapPolyLine and MouseArea

2019-03-07 Thread maitai
Hi Tony, Yes in fact there is a quadtree on top of that. Philippe. Le 08-03-2019 02:31, Tony Rietwyk a écrit : Hi Philippe, Just to confirm - you are filtering your list of lines by using the bounding rectangle first, then doing the detailed line-segment check? Regards, Tony On 8/03/2019 4

Re: [Interest] QtLocation MapPolyLine and MouseArea

2019-03-07 Thread Tony Rietwyk
Hi Philippe, Just to confirm - you are filtering your list of lines by using the bounding rectangle first, then doing the detailed line-segment check? Regards, Tony On 8/03/2019 4:32 am, maitai wrote: Hi, I need to trigger various actions whenever a MapPolyLine is hovered or pressed, such

Re: [Interest] Rendering Qt/QML within native OpenGL or to texture

2019-03-07 Thread Giuseppe D'Angelo via Interest
Hi, Il 07/03/19 18:33, Stefan Fabian ha scritto: Today I've found another way to use native OpenGL to draw on top of the scene in OGRE after the render queue ended but couldn't work out how to paint on it using Qt without getting stuck at the getting the content on screen without the QImage c

Re: [Interest] QtLocation MapPolyLine and MouseArea

2019-03-07 Thread Jérôme Godbout
If you ever need that approach you could avoid the qsqrt() and compare the square distance instead, that would save some time (but yes it still heavy). If you have a line thickness threshold you could square it when you receive it only once. The best would be to have a shader doing it for you, y

Re: [Interest] QtLocation MapPolyLine and MouseArea

2019-03-07 Thread maitai
Yes thanks I know the maths for that, the problem being it's going to be calculated for all lines every time the user touches the mouse. Just to share here is my routine to calculate a QPointF distance to a QLineF: #define DIST(P1, P2) ((P1.x() - P2.x()) * (P1.x() - P2.x()) + (P1.y() - P2.y(

Re: [Interest] QtLocation MapPolyLine and MouseArea

2019-03-07 Thread Shawn Rutledge
> On 7 Mar 2019, at 18:32, maitai wrote: > > Hi, > > I need to trigger various actions whenever a MapPolyLine is hovered or > pressed, such as displaying a tooltip, a menu, etc. > > I have put a MouseArea on it with anchors.fills: parent, but the problem is > that the mouse area does not rep

Re: [Interest] QtLocation MapPolyLine and MouseArea

2019-03-07 Thread Jérôme Godbout
Just throwing an idea, maybe you could convert the mouse click or hover to coordinate on the Map::toCoordinate() and interpolate the coordinate to see with parameter to the line vector and then find the distance to that line parameter point or min/max point. This is not super fast but could be q

[Interest] Rendering Qt/QML within native OpenGL or to texture

2019-03-07 Thread Stefan Fabian
Hey, I'm having another attempt at a problem I failed to solve about a year ago. The rough sketch is: I have an external application which is using Qt and renders some content using the OpenSource graphics engine OGRE. (I can't / don’t want to change the application's source. My current approach

[Interest] QtLocation MapPolyLine and MouseArea

2019-03-07 Thread maitai
Hi, I need to trigger various actions whenever a MapPolyLine is hovered or pressed, such as displaying a tooltip, a menu, etc. I have put a MouseArea on it with anchors.fills: parent, but the problem is that the mouse area does not represent the line, but the polygon made by the line. For in

[Interest] PinchHandler weirdness

2019-03-07 Thread Alexander Ivash
I have an issue which is reproducible only on android, but not on desktop. And looks like PinchHandler is the root cause (at least commenting it out changes behaviour). What is interesting, is that the issue happens without any interaction with pinch handler from my side. Just its presence under an