This is a custom widget to render a WYSIWYG text view (with font rendering and similar), that is bound to a physical page size, similar to other rich text editors such as Microsoft Word or LibreOffice Writer.
In the end, this widget is being written for a specific application and as such might have features specifically for said application. The code should however still be generic enough to be usable for other developers and projects.