Create Custom Slate-Widgets in Projects Settings

I think you want to use FDirectoryPath instead of FString: