(This is my first question here so apologies in advance if I break any rule. I have seen a question on how to align an object relative to nodes here, but I haven't found how to align a node with respect to another object.)
I would like to know the best way to align a node of one object with the middle point of another object. For example, imagine I have a rectangle and a diagonal line (a straight Bezier curve with two nodes). The top node of the line is already aligned with the bottom side of the rectangle in the y axis, but it is at an arbitrary position with respect to the rectangle in the y axis (left). I would like to align the top node of the line with respect to the middle point of the rectangle in the x axis, leaving the bottom node of the line and also the rectangle unchanged (right).
What is the most efficient way to achieve this?