style qt like unreal 5
Project description
Unreal Stylesheet
A Qt stylesheet designed to make your tools look native in Unreal Engine 5
Installation
PIP install the latest release from PYPi (recommended):
python -m pip install unreal-stylesheet
or install from the repo:
python -m pip install git+https://github.com/leixingyu/unrealStylesheet
Using the stylesheet
Simply import unreal_stylesheet
and call setup()
:
# ensure you have a Qt application:
# app = QtWidgets.QApplication(sys.argv)
import unreal_stylesheet
unreal_stylesheet.setup()
# show your qt widgets
# window = YourTool()
# window.show()
Comparison
The following .ui
files for testing can be found inside the /ui
folder.
default (editor.ui) | ue.qss |
---|---|
default (tree.ui) | ue.qss |
---|---|
default (progress.ui) | ue.qss |
---|---|
Contribute
Feel free to make a PR or issue if you find a bug, or want to request a feature.
Some guidelines to modify this stylesheet:
Modifying the style sheet
You can modify the .qss
style sheet directly,
or you can modify on top of the CSS preprocessor .scss
file.
Once finished, re-compile the .qss
:
qtsass ue.scss -o ue.qss
Documentation about .scss can be found: Sass Official website
You'll also need to install a Qt specific Sass: qt-sass
Modifying icons
The icons are handled with Qt's resource system (to learn more, visit here)
You can modify the .qrc
file and re-compile the .rcc
as follows:
rcc -binary icons.qrc -o icons.rcc
References
- Qt documentation:
- Github repo: Qt-Material
- Unreal has a different UI framework (Slate), future read on comparing Qt to Slate
- An example of this stylesheet in action: unrealScriptEditor
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
Built Distribution
Hashes for unreal_stylesheet-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c44c074130f4d973046964e83b74b6e8fa3b6911c89af823abef79b36140c1f |
|
MD5 | ff15b0e8e0abbfbd45d0276d9e95dd79 |
|
BLAKE2b-256 | c60a30e367794604f74219705ef440bc006fff479f43dd8cabd824612451cfb0 |