An example of QtQuick 2 providing material and fluent design themes in PyQt5.
NOTE: A better practice for communication between front-end (QML) and back-end (Python) can be found in neural-network-sandbox repository.
Run
main.pywith theme names as second parameter.
python main.py Default python main.py Fusion python main.py Imagine python main.py Material python main.py Universal
Change environmental variable
QT_QUICK_CONTROLS_STYLEin
main.py.
# main.pySet the QtQuick Style
Acceptable values: Default, Fusion, Imagine, Material, Universal.
os.environ['QT_QUICK_CONTROLS_STYLE'] = 'Default'
You could download the latest binary distribution here (Linux 64bit):
Package the source code manually:
.qrcfiles must be located in the same directory with the python file which will load the resource in qrc.
pyrcc5 -o pyqt5_qtquick2_example/resources.py resources.qrc pyinstaller main.py -y --windowed --additional-hooks-dir pyi_hooks/