Howdy!
Native programing is more nasty than I thought. So I came across the nested class definition (in SScissorRectBox.h)
for which the object declaration in the following fashion
where RebuildListWidget() is declared as
yields the error
Now it makes me think that the additional lines
should rectify the error. I haven't compiled the code because it means changing the Engine code. Just looking for the second opinion
Native programing is more nasty than I thought. So I came across the nested class definition (in SScissorRectBox.h)
Code:
class SLATE_API SScissorRectBox : public SPanel { public: class FScissorRectSlot : public TSupportsOneChildMixin<FScissorRectSlot> { public: FScissorRectSlot(SWidget* InOwner) : TSupportsOneChildMixin<FScissorRectSlot>(InOwner) {} }; SLATE_BEGIN_ARGS(SScissorRectBox) { _Visibility = EVisibility::SelfHitTestInvisible; _Clipping = EWidgetClipping::ClipToBounds; } SLATE_DEFAULT_SLOT(FArguments, Content) SLATE_END_ARGS() void Construct( const FArguments& InArgs ); /** * See the Content slot. */ void SetContent(const TSharedRef< SWidget >& InContent); private: virtual FVector2D ComputeDesiredSize(float) const override; virtual void OnArrangeChildren( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren ) const override; virtual FChildren* GetChildren() override; virtual int32 OnPaint( const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const override; FScissorRectSlot ChildSlot; };
Code:
TSharedPtr<SScissorRectBox> ScissorRectBox = SNew(SScissorRectBox)[RebuildListWidget()];
Code:
virtual TSharedRef<SListView<UObject*>> RebuildListWidget();
Code:
default constructor of 'SScissorRectBox' is implicitly deleted because field 'ChildSlot' has no default constructor FScissorRectSlot ChildSlot;
Code:
class FScissorRectSlot : public TSupportsOneChildMixin<FScissorRectSlot> { public: FScissorRectSlot(SWidget* InOwner) : TSupportsOneChildMixin<FScissorRectSlot>(InOwner) {} FScissorRectSlot() {} };

Comment