Best method to create a slate widget inside another widget

Hello everyone…

Whats the best way to create a slate widget inside another slate widget.

I have a inventory slate widget that draws items using a for loop. And after writing the it, I noticed I am going to need to create another widget for each item.

I have made the both widgets just by passing the HUD class…

But I think for the itemwidget, I need to pass the InventoryWidget some how but I am not sure how to achieve it.

TSharedPtr<SVerticalBox> Col;
	SAssignNew(Col, SVerticalBox);
	for (int32 i = 0; i < 4; i++)
	{
		Col->AddSlot()
		.HAlign(HAlign_Fill)
		.VAlign(VAlign_Fill)
		[
			SNew(SItemWidget)
		];
	}

I am calling it like this but I don’t think it will work simply by this alone…