Hi all, im currently trying to learn slate trying to build a custom ui for my plugin and im facing an odd error when i try to declare a SlistView in this way:
auto ListView = SNew(SListView<TSharedPtr<FString>>);
or even a full declaration
auto ListView = SNew(SListView<TSharedPtr<FString>>)
.ItemHeight(24)
.ListItemsSource(&list)
.OnGenerateRow(this, &FMypluginModule::OnGenerateRowForList)
.HeaderRow
(
SNew(SHeaderRow)
+ SHeaderRow::Column("Name")
[
SNew(SBorder)
.Padding(5)
.Content()
[
SNew(SButton)
.Text(FText::FromString("Test"))
]
]
+ SHeaderRow::Column("Number").DefaultLabel(TEXT("Number"))
+ SHeaderRow::Column("TextField").DefaultLabel(TEXT("Text Field"))
+ SHeaderRow::Column("TextBlock").DefaultLabel(TEXT("Text Block"))
+ SHeaderRow::Column("AddChild").DefaultLabel(TEXT("Add Child"))
);
This is the error list:
H:\Ue4Custom\4.13\UnrealEngine\Engine\Source\Runtime\Core\Public\Misc\Attribute.h(44): error C2664: 'FText::FText(const FText &)': cannot convert argument 1 from 'const FString' to 'FText::EInitToEmptyString'
2> H:\Ue4Custom\4.13\UnrealEngine\Engine\Source\Runtime\Core\Public\Misc\Attribute.h(44): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
2> H:\Users\Darky\Documents\Unreal Projects\Development-testing\Plugins\Myplugin\Source\Myplugin\Private\Myplugin.cpp(148): note: see reference to function template instantiation 'TAttribute<FText>::TAttribute<ObjectType>(const OtherType &)' being compiled
2> with
2> [
2> ObjectType=FString,
2> OtherType=FString
2> ]
2> H:\Users\Darky\Documents\Unreal Projects\Development-testing\Plugins\Myplugin\Source\Myplugin\Private\Myplugin.cpp(144): note: see reference to function template instantiation 'TAttribute<FText>::TAttribute<ObjectType>(const OtherType &)' being compiled
2> with
2> [
2> ObjectType=FString,
2> OtherType=FString
2> ]
2>ERROR : UBT error : Failed to produce item: H:\Users\Darky\Documents\Unreal Projects\Development-testing\Plugins\Myplugin\Binaries\Win64\UE4Editor-Myplugin.pdb
2> Total build time: 10,22 seconds
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command "H:\Ue4Custom\4.13\UnrealEngine\Engine\Build\BatchFiles\Build.bat Development_TestingEditor Win64 Development "H:\Users\Darky\Documents\Unreal Projects\Development-testing\Development_Testing.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
im currently wondering if i need some include files that are missing