Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Why does mapToItem return a QVariantMap instead of QPoint?

$
0
0
An inconvenience I stumbled upon – it is not possible to assign the result of mapToItem to a point property. That just doesn’t seem like a very good design intent. Instead of: p = mapToItem(null, mouseX, mouseY) I have to assign each component individually: p.x = mapToItem(null, mouseX, mouseY).x p.y = mapToItem(null, mouseX, mouseY).y which also has to call the mapToItem function twice. I also noticed that QML elements really don’t have the concept of position build in, only the individual components of it. Which means more bindings and more assignment to move elements by their individual position components.

Viewing all articles
Browse latest Browse all 18427

Trending Articles