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
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
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
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,
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
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