[QGIS-Developer] PyQgis Standalone app from 3.4 to 3.16

2022-10-03 Thread PIERRE Sylvain via QGIS-Developer
Hi devs, I'm porting a PyQgis standalone app from 3.4 to 3.16 api. I get an error with the new 3.16 app QSqlDatabase: QPSQL driver not loaded QSqlDatabase: available drivers: The most visible change I noticed is python 3.7 to 3.9. Is there any impact on PyQt5 bindings ? With python 3.7 there

Re: [QGIS-Developer] import 3d or _3d in python?

2022-10-03 Thread Andrea Giudiceandrea via QGIS-Developer
Il 03/10/2022 09:19, Raymond Nijssen via QGIS-Developer ha scritto: I know, but my script is not running in the console. It is part of a plugin, so I need to do the import. Would be handy if the documentation tells me how to do it. Yes, I understood that. I just wanted to point out that QGIS

Re: [QGIS-Developer] import 3d or _3d in python?

2022-10-03 Thread Martin Dobias via QGIS-Developer
Hi Raymond The general idea is that for every PyQGIS module (e.g. "core") there is a compiled python module (e.g. _core.so) and a directory acting as a module ("core") which imports the compiled module and adds some extra functionality (docstrings and more). So normally one wants to use import

Re: [QGIS-Developer] import 3d or _3d in python?

2022-10-03 Thread Raymond Nijssen via QGIS-Developer
Hi Andrea, I know, but my script is not running in the console. It is part of a plugin, so I need to do the import. Would be handy if the documentation tells me how to do it. Kind regards, Raymond On 03-10-2022 09:02, Andrea Giudiceandrea via QGIS-Developer wrote: Il 03/10/2022 08:57,

Re: [QGIS-Developer] import 3d or _3d in python?

2022-10-03 Thread Andrea Giudiceandrea via QGIS-Developer
Il 03/10/2022 08:57, Raymond Nijssen via QGIS-Developer ha scritto: Instead I need to add an underscore for the 3d module name: from qgis._3d import QgsLayoutItem3DMap In the Python console, the 3d library is automatically imported (if QGIS is compiled with 3d support) with: from qgis._3d

[QGIS-Developer] import 3d or _3d in python?

2022-10-03 Thread Raymond Nijssen via QGIS-Developer
While trying to import a 3D class in a python script, I found out that the code in the pyqgis docs is not working (for me): from qgis.3d import QgsLayoutItem3DMap Instead I need to add an underscore for the 3d module name: from qgis._3d import QgsLayoutItem3DMap Should this be fixed in