Icons look different in QtDesigner preview VS running generated python script
-
Hi All,
I have created an interface that looks great in the Qt Designer preview, but when saving the .ui file and converting it to .py file my icons loose sharpness.
QT Designer preview:

main.py results:

I have no idea what is happening.
Here is my full pipeline:
- Create .ui file in QT Designer
- Convert it to python: $ pyuic6 -x main_window.ui -o main_window.py
- Convert resources.qrc to python $ pyside6-rcc resources.qrc -o resources.py
- Add
import resourcesto my main_window.py
5. Run programI am using PyQt6, not PySide6
Can anyone advice
-
Hi,
Which version of PyQt 6 are you using ?
Which format are you using for your icons ?
On which OS ?
How did you install PyQt6 ?
Is Designer the one from you got with PyQt6 ? -
-
PyQt6 version:

-
Icons format SVG. Here is an example code of one of them:
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="#8f93a9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-activity"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg> -
MacOS Monterey 12.4
-
I installed PyQt6 via pip install
-
Designer was obtained via installing the pyqt5-tools
-
-
Can you provide a minimal script + svg that shows the behaviour ?