Error: cannot convert argument 2 from 'FString (__cdecl FMyClassDetails::* )(void) const' to 'FString (__cdecl IPropertyHandle::* )(void) const'

Hey everyone,
What does this error mean?

Error C2664 'SObjectPropertyEntryBox::FArguments::WidgetArgsType &SObjectPropertyEntryBox::FArguments::ObjectPath<IPropertyHandle>(TSharedRef<IPropertyHandle,ESPMode::NotThreadSafe>,FString (__cdecl IPropertyHandle::* )(void) const)': cannot convert argument 2 from 'FString (__cdecl FMyClasssDetails::* )(void) const' to 'FString (__cdecl IPropertyHandle::* )(void) const'	

Just to give some context, I’m trying to provide a SObjectPropertyEntryBox with a .ObjectPath() wich takes the following as arguments:

ObjectPath(TSharedRef<UserClass> InUserObjectRef, TDelegate<FString>::TSPMethodDelegate_Const<UserClass>::FMethodPtr Infunc)

So I’m trying to provide the FString with my Delegate

FString GetModelPath() const;

But that doesn’t seem to do the trick, since I get the error above. Please help me understand what is the problem here. I’m stuck on it for days. Thank you!!!

ObjectPath takes a pointer to member function of IPropertyHandle but you are giving it a pointer to member function of FMyClasssDetails. If your class actually inherits from IPropertyHandle you can cast it like so:

static_cast<FString (IPropertyHandle::*)() const>(&FMyClasssDetails::GetModelPath);

Thank you for your explanation!