I have no problem creating the tab. However, when I try to use any of the include files that I’ve found relevant seem to be incomplete types, and SWebBrowserWidget doesn’t seem to work for me?
(I tried: SWebBrowser.h, SWebBrowserView.h, WebBrowser.h, WebBrowserViewport.h)
TSharedRef<SDockTab> FCustomClass::SpawnTab(const FSpawnTabArgs& TabSpawnerArgs)
{
return SNew(SDockTab)
.TabRole(ETabRole::NomadTab)
[
// This works without problems
SNew(SBox).VAlign(VAlign_Center).HAlign(HAlign_Center)
[
SNew(STextBlock).Text(FText::FromString(TEXT("Placeholder")))
]
// None of these work, tells me they are incomplete types
SNew(SWebBrowser / SWebBrowserView)
[
]
// This is recognized but causes crashes
// And only has default Slate Named Arguments
// (ie. SNew(...)./AccessibleParams())
SNew(SWebBrowserWidget)
[
// I dont know what to do here either
]
];
}
I would really appreciate it if anyone can help me make sense of how to create a Web Browser in my Custom Created Tab
I feel like I should also further elaborate on an issue that is caused with trying to use
#include "WebBrowser/Public/SWebBrowser.h" , it crashes at compile time, telling me either that there was an error generating some PCH file, or "FBrowsingContextSettings uses undefined struct ‘WEBBROWSER_API’ "
#include "WebBrowser/Public/SWebBrowserView.h" and include "WebBrowser/Public/WebBrowserViewport.h", it crashes at compile time, telling me “incomplete type not allowed”
So unless I’m missing something I don’t see how its exactly possible to create a Web Browser within the UE Tabs like its shown in the SlateViewer?
The issue was that adding the SWebBrowser.h file like I did doesnt work, I needed to add it to the public dependencies in the .build file of my module.
Even after that it still has issues with Intellisense not recognizing it so: SNew(SWebBrowser) will still show an error, but will compile and work as it does in the SlateViewer example.
Although I noticed that it will crash at compile time when instead of SNew I do:
Thank you I was having problems geting the include file to work but that was because I didn’t add the web browser to the .build module in PublicDependencyModuleNames.AddRange(new string[] { “WebBrowser”});
Hello, I would like to know why your webbrowser can load web pages. The webrowser under my Swindow doesn’t seem to work.Can you tell me how you did it? thank you!!! I am unable to upload images, but the address bar prompts me Browser Window is not valid/supported.