Skip to main content

A Qt manager for Unreal that enables the use of PyQt & PySide in Unreal Engine

Project description

unreal qt

QT PySide2 support for unreal engine 5 (likely works in unreal 4)

  • prevent widget from instantly dissapearing due to garbage collection
  • automatically style all Qt widgets using Xingyu Lei's unreal_stylesheet
  • dark window bar for a better visual match with Unreal
  • parent widget to Unreal's main window to stay on top

Quickstart

this guide assumes you have PySide2 installed already!

  1. Add the unreal_qt folder in your python path. See unreal docs
  2. Use the following code snippet to create sample.py and add it to unreal python path.
# 1. SETUP - this step can automatically run on editor startup when added to your init_unreal.py
import unreal_qt
unreal_qt.setup()  

# 2. CREATE WIDGET - create your qt widget
# every widget you make after setup won't block the editor & have unreal styling
from PySide2.QtWidgets import QLabel, QWidget, QVBoxLayout
w = QWidget()
layout = QVBoxLayout()
w.setLayout(layout)
layout.addWidget(QLabel("Hello World!"))

# 3. WRAP WIDGET - (optional) manage garbage collection, add darkbar, stay on top
unreal_qt.wrap(w)

# 4. SHOW WIDGET - if using stay on top this needs to run after the wrap stage
w.show()
  1. import script in unreal with the Python terminal to run it.
import sample

image

Dark title bar

The windows bar is by default white on Windows, and QT can't change the bar color.

With unreal_qt you can add a custom bar.

  • default window bar & frame

image

  • custom bar, no frame (no resize support!)

image

  • custom bar, frame, no title bar (supports resize)

image

community

similar to

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unreal-qt-0.0.1.tar.gz (11.4 kB view hashes)

Uploaded Source

Built Distribution

unreal_qt-0.0.1-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page