Run main.py
with 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_STYLE
in main.py
.
# main.py
# Set 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:
.qrc
files 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/
WARNING:
Pyinstaller==3.3.1
has some minor errors for the Material and Imagine themes in Linux. You could use the latest (unstable) pre-release Pyinstaller (3.4
) to fix these problems. Yet, the hook files inpyi_hooks
require minor changes for the update. However, in Windows platform, the packaging process and the binary distribution are completely perfect.
PyQt5
pip install pyqt5
PyQtChart
pip install pyqtchart
Pyinstaller (only for packaging)
pip install pyinstaller