Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

How to get Screen Coordinates of a QML Item?

$
0
0
I have a QQuickView that displays a scene. I want to know at which screen coordinate a certain QML item is located at. I know from inside the QML I can call myItem.mapToItem(null, myItem.x, myItem.y) But I want to give the result (QVariantMap) to a C++ Q_INVOKABLE method that displays a dialog at the position of myItem.x,myItem.y It seems I need to map the QQuickView coordinates to Screen coordinates. But how?

Viewing all articles
Browse latest Browse all 13965

Trending Articles