<div dir="ltr"><div dir="ltr"><div dir="ltr">I am converting an application to PyQt6 and came across a bug in pyuic6.<div><br></div><div>Removing references to pyrcc5, I used QtCreator to set icon filenames directly in a .ui file (instead of pointing to the resource file).</div><div><br></div><div>When I compile the file using pyuic6 and attempt to display the test window, I receive the following error:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">❯ python PlaybackControl_UI.py<br></font><font face="monospace">Traceback (most recent call last):<br></font><font face="monospace">  File "[...]/PlaybackControl_UI.py", line 112, in <module><br></font><font face="monospace">    ui.setupUi(PlaybackControl)<br></font><font face="monospace">  File "[...]/PlaybackControl_UI.py", line 36, in setupUi<br></font><font face="monospace">    icon.addPixmap(QtGui.QPixmap("icons/Media-skip-backward.svg"), <b>QtGui.QIcon.Normal</b>, <b>QtGui.QIcon.Off</b>)<br></font><font face="monospace">AttributeError: type object 'QIcon' has no attribute 'Normal'</font></blockquote></div><div><br></div><div>This occurs because enumerated states were moved into enum objects.  The generated code should read:</div><div><br></div><div><font face="monospace">icon.addPixmap(QtGui.QPixmap("icons/Media-skip-backward.svg"), <b>QtGui.QIcon.Mode.Normal</b>, <b>QtGui.QIcon.State.Off</b>)</font><br><br>David</div></div></div></div>