get a widget's location in screenspace

for c++ users →

FGeometry WidgetGeometry = GetTickSpaceGeometry();

UCanvasPanelSlot* TootlipAsCanvasSlot = UWidgetLayoutLibrary::SlotAsCanvasSlot(TooltipWidget);

if (IsValid(TootlipAsCanvasSlot ) == false)
return;

FVector2D PixelPosition;
FVector2D ViewportPosition;

USlateBlueprintLibrary::AbsoluteToViewport(
GetOwningPlayer()->GetWorld(), WidgetGeometry .GetAbsolutePosition(), PixelPosition, ViewportPosition);

MovableWindowAsCanvasSlot->SetPosition(
FVector2D(ViewportPosition.X + WidgetGeometry.Size.X, ViewportPosition.Y)
);