How to change OutlineSettings CornerRadii in C++


I created a first widget Blueprint.

I have added a UButton in my widget with Image and TextBlock call ToolButton

Then I created a second widget ToolBar with multiple ToolButtons.

After set my blueprint I just create cpp and header file in my project for the logic (I don’t want to use the Graph section of Blueprint because I do not understand it). Then I created widgets binding in header file for each buttons of my ToolBar, I use UMG.

In the Blueprint Designer section of Unreal Engine I have custom the Style of my ToolButton.

So I change Draw As for Rounded Box which is a ESlateBrushDrawType enumeration.

I change too the Outline Settings Corner Radii, by default I set all corners radius to 0.0

And I set Rounding Type to Fixed Radius.

The problem is : I want to change the Corner Radii of Outline Settings of the first button in my ToolBar and the last button because I want they are rounded to make my bar rounded. If I change it in my ToolButton it will affect all other buttons in my ToolBar.

I have seen I can modify in C++ the Draw As settings like this :

ToolButton->WidgetStyle.Normal.DrawAs = ESlateBrushDrawType::Image; // If I want to draw it as an image but I don’t want of course it is just an example.

I search for how to do the same thing for Outline Settings and Corner Radii but I cannot find anything about it so please help me if you know how to do that.