style qt like unreal 5
Project description
Unreal Stylesheet
A Qt stylesheet designed to make your tools look native in Unreal Engine 5
Quickstart sample code:
import unreal_stylesheet
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
# style your QApp, requires a QApplication instance
unreal_stylesheet.setup() # <== Just 1 line of code to make the magic happen
# create & show your Qt widget
window = TestWindow()
window.show()
sys.exit(app.exec_())
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
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
- Modify the CSS preprocessor
.scss
file - Re-compile the
.qss
:
qtsass ue.scss -o ue.qss
⚠️ If you modify the .qss
style sheet directly, your changes will be lost when the .qss
is re-compiled in the future
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 (see the docs) (which is dropped in qt6)
- Modify the
.qrc
file - Re-compile the
.rcc
:
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
File details
Details for the file unreal-stylesheet-0.0.4.tar.gz
.
File metadata
- Download URL: unreal-stylesheet-0.0.4.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 820ac1ecec65121e291884860a1b86e84d5e37af00bc99d9d6dde4db47c9e9af |
|
MD5 | bb8a9f41d35500d1f9911872e36d9671 |
|
BLAKE2b-256 | a1f6afd0661611d8cad2bdb837c04e7cfaa2f577bf37d738734a024253f1ba61 |
File details
Details for the file unreal_stylesheet-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: unreal_stylesheet-0.0.4-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7c5c9aae0e17910b05414ec453ed0b64e74e6c9b61e723270aa6a573980ad56 |
|
MD5 | b408c0595cf8a02ad7dd5977203b5c8d |
|
BLAKE2b-256 | 58d5680f35e7f685e92de58db77e5458cbf40b0b4d36619312dfdd08f34055c6 |