# Creating a Web Browser in a Custom Slate Tab

**URL:** <https://forums.unrealengine.com/t/creating-a-web-browser-in-a-custom-slate-tab/583968>\
**Category:** C++\
**Tags:** unreal-engine, slate, UE4, CPP, question, UE4-27\
**Created:** [June 17, 2022, 8:44am UTC](https://forums.unrealengine.com/t/creating-a-web-browser-in-a-custom-slate-tab/583968 "2022-06-17T08:44:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neuffexx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neuffexx/32/683563_2.png) [@Neuffexx](https://forums.unrealengine.com/u/Neuffexx)\
**Post date:** [June 17, 2022, 8:44am UTC](https://forums.unrealengine.com/t/creating-a-web-browser-in-a-custom-slate-tab/583968/1 "2022-06-17T08:44:18Z")

</div>

Hey,

I’ve been trying extend the Editor to allow me to create a Tab which holds a Web Browser, like this example from the SlateViewer.exe TestSuite1 :

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/d/26de60f01f21ad1e9f3822da23fa2124b4e50cd1.png)

* * *

* * *

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)

```auto
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 🙂

---

<div class="post-metadata">

**Author:** ![Neuffexx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neuffexx/32/683563_2.png) [@Neuffexx](https://forums.unrealengine.com/u/Neuffexx)\
**Post date:** [June 20, 2022, 5:39am UTC](https://forums.unrealengine.com/t/creating-a-web-browser-in-a-custom-slate-tab/583968/2 "2022-06-20T05:39:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Neuffexx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neuffexx/32/683563_2.png) [@Neuffexx](https://forums.unrealengine.com/u/Neuffexx)\
**Post date:** [June 20, 2022, 7:30am UTC](https://forums.unrealengine.com/t/creating-a-web-browser-in-a-custom-slate-tab/583968/3 "2022-06-20T07:30:53Z")

</div>

> [@Neuffexx](#):
>
> 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?

* * *

From what I gathered with some help,

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:

In .h file:

```auto
#include "SWebBrowser.h"

...

SWebBrowser MyWebBrowser;

```

In .cpp file:

```auto
#include "MyHeader.h"

...

SAssignNew(MyWebBrowser, SWebBrowser)

```

* * *

For some reason it will not be able to compile this telling me these errors (also when forward declared) :

- “SWebBrowser” is undefined

**Edit** \* I forgot and simply declared it wrong, it should be:  
`TSharedPtr<SWebBrowser> MyBrowser;`

---

<div class="post-metadata">

**Author:** ![Neuffexx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/neuffexx/32/683563_2.png) [@Neuffexx](https://forums.unrealengine.com/u/Neuffexx)\
**Post date:** [June 20, 2022, 7:53am UTC](https://forums.unrealengine.com/t/creating-a-web-browser-in-a-custom-slate-tab/583968/4 "2022-06-20T07:53:57Z")

</div>

So to summarize for anyone looking back at this in the future:

- Include “WebBrowser” in you `.build` file’s dependencies
- Add the include “SWebBrowser.h” to your file in which your creating the browser
- Use `SNew(SWebBrowser)` / `SAssignNew(/*YourBrowser*/, SWebBrowser)`

And you should be set. Hope this was helpful, and saved someone out there some time figuring this out.  
Especially if your a beginner like me 🙂

---

<div class="post-metadata">

**Author:** ![JeremyBrendli](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JeremyBrendli](https://forums.unrealengine.com/u/JeremyBrendli)\
**Post date:** [February 2, 2023, 3:27pm UTC](https://forums.unrealengine.com/t/creating-a-web-browser-in-a-custom-slate-tab/583968/5 "2023-02-02T15:27:27Z")

</div>

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”});

---

<div class="post-metadata">

**Author:** ![Dereds](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dereds](https://forums.unrealengine.com/u/Dereds)\
**Post date:** [March 21, 2024, 2:06pm UTC](https://forums.unrealengine.com/t/creating-a-web-browser-in-a-custom-slate-tab/583968/6 "2024-03-21T14:06:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![a2msystemes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@a2msystemes](https://forums.unrealengine.com/u/a2msystemes)\
**Post date:** [July 9, 2025, 10:11pm UTC](https://forums.unrealengine.com/t/creating-a-web-browser-in-a-custom-slate-tab/583968/7 "2025-07-09T22:11:11Z")

</div>

Hello, Same For me on 5.6…  
And I have an error triggered OnLoadError delegate. Something related to HTTPS ?  
Tomorrow I’ll try a plain old HTTP local URL and maybe a raw HTML string… To see what’s going on.  
And I’ll try to see which controls we have over HTTP requests (Basic AUTH, HTTP HEADERs, etc…)  
To be continuer 🥰 !!!
