<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I am using Visual Studio Code with the Python (Pylance) extension to provide autocomplete services.  <div class=""><br class=""></div><div class="">My environment is configured like so:</div><div class=""><br class=""></div><div class="">Python 3.9.1</div><div class="">PyQt6==6.0.3<br class="">PyQt6-3D==6.0.3<br class="">PyQt6-3D-Qt6==6.0.2<br class="">PyQt6-Qt6==6.0.2<br class="">PyQt6-sip==13.0.1</div><div class=""><br class=""></div><div class="">The following simple script runs fine and both pylance and pylint find no problems with it:<div class=""><br class=""></div><div class="">-------------------</div><div class="">from PyQt6.Qt3DExtras import Qt3DWindow<br class="">from PyQt6.QtWidgets import QApplication<br class=""><br class="">app = QApplication([])<br class=""><br class="">view = Qt3DWindow()<br class="">view.show()<br class=""><br class="">app.exec()<br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px;"><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class="">-------------------</div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class="">However autocomplete is not picking up correct type information for everything under the PyQt6-3D module.  In the above example, the QApplication object will produce autocomplete suggestions, but the Qt3DWindow object will not.</div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class="">I believe it has something to do with the structure of the pyi files for the PyQt modules.  The pyi files for the regular PyQt6 modules have their class definitions at the top level, while the pyi files for the PyQt6-3D modules have nested definitions:</div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class=""># QtWidgets.pyi</div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">class QApplication(QtGui.QGuiApplication):</span></font></div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class=""># Qt3DExtras.pyi</div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">class Qt3DExtras(PyQt6.sip.simplewrapper):<br class=""><br class="">    class QAbstractCameraController(Qt3DCore.QEntity):</span></font></div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class="">So I can still write working code, but the lack of autocomplete makes the process very painful.</div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class="">Anyone have any experience or understanding of what’s going on here?</div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class=""><br class="Apple-interchange-newline">Michael Gentili</div><div style="color: rgb(0, 0, 0); -webkit-text-decorations-in-effect: none;" class="">MCP INC</div></span>

</div>
<br class=""></div></div></body></html>