# Create widget in pure C++

**URL:** <https://forums.unrealengine.com/t/create-widget-in-pure-c/367306>\
**Category:** UI\
**Tags:** create, unreal-engine, Widget, question, CPP\
**Created:** [August 16, 2016, 1:20pm UTC](https://forums.unrealengine.com/t/create-widget-in-pure-c/367306 "2016-08-16T13:20:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Pelangi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pelangi](https://forums.unrealengine.com/u/Pelangi)\
**Post date:** [August 16, 2016, 1:20pm UTC](https://forums.unrealengine.com/t/create-widget-in-pure-c/367306/1 "2016-08-16T13:20:27Z")

</div>

I have read several links regarding creation of widgets in C++. One of them is this:

> **[\[C++\] Create Widget](https://forums.unrealengine.com/questions/130528/c-create-widget.html)**
>
> How could I recreate this blueprint in C++ code. It’d be great! I can’t seem to figure it out.

Unfortunately that was in 2014. It’s 2 years from then. So I assume, UE is much better and support many more libraries. So with UI 4.12.5, is it really possible to fully create a simple widget with a simple `UTextBlock` in it and display a text on screen?

Remember, my question is to do that in **pure** C++. No blueprint widget or any reference to blueprint widget is allowed in here. If you can answer it, please provide the very simple source code in header file and cpp file to enable this. Because I’ve encountered many people who give unclear answers (without source code) which cannot be compiled or does not solve the problem.

---

_[View the full topic](https://forums.unrealengine.com/t/create-widget-in-pure-c/367306)._
