Creating a floating "editor"

If you want just a basic line, this might be enough:

Image from Gyazo

Create a couple of helper widgets (here, borders) - these will serve as anchors. You can then draw a line between them:

I made the anchors semi-transparent to better visualise the line. The A is set to draw to the middle of the anchor.