[QGIS-Developer] Request for Initial Feedback on Layer Atlas Plugin

info at opengis.it info at opengis.it
Wed Jul 10 23:49:53 PDT 2024


   Hi, your question unblocked me.

   I'm using my "qgis2web" plugin and your "layer atlas" plugin in a laptop with integrated (not dedicated) video card and that's why I get white screen when I use our plugins. Using them on a desktop PC with a dedicated video card both work.

   Taking inspiration from the "HERE Maps for QGIS" plugin which works well on my laptop and which uses QtWebEngine, I understood that to make our plugins work we need to add a setting.

   In Layer_Atlas_dockwidget.py file edit:

   from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineSettings

   and add WebGLEnabled settings:

   class CustomWebEngineView(QWebEngineView):

       def __init__(self, *args, **kwargs):

           super(CustomWebEngineView, self).__init__(*args, **kwargs)

           

           settings = self.settings()

           settings.setAttribute(QWebEngineSettings.WebGLEnabled, True)

   Your plugin will work perfectly even on PCs without a dedicated video card.

   Now you should configure automatic installation of the dependency in case it is not there. This way all users, even those who install via .msi, will be able to use your plugin. Always take inspiration from the "Here" plugin, I still have to finish the code but I'm almost done.

   Congratulations for the plugin, it works great and I think it is very useful.

   Andrea Ordonselli
   OpenGIS.it

   Da "Jean-Baptiste Peter" jbpeter at outlook.com
   A "info at opengis.it" info at opengis.it
   Cc "qgis-developer at lists.osgeo.org" qgis-developer at lists.osgeo.org
   Data Tue, 9 Jul 2024 17:14:21 +0000
   Oggetto RE: Re:[QGIS-Developer] Request for Initial Feedback on Layer Atlas Plugin

   This is head spinning! For OSGeo4W install with "python3-pyqtwebengine" selected, are you testing this in a VM? I wonder if the crash at startup may be caused by the fact that qwebengineview is using opengl which is not working with emulated graphics. This works on my desktop.


   I am sure for the .msi installer and will have to do further research.


   Best,


   Jean-Bapiste


   From: info at opengis.it <info at opengis.it>
   Sent: Tuesday, July 9, 2024 5:28 PM
   To: jbpeter at outlook.com
   Cc: qgis-developer at lists.osgeo.org
   Subject: RE: Re:[QGIS-Developer] Request for Initial Feedback on Layer Atlas Plugin


   Since version 3.38.0 the QtWebEngine export has been added back to qgis.PyQt as you can see here: https://github.com/qgis/QGIS/blob/final-3_38_0/python/PyQt/CMakeLists.txt


   So by installing the standard QGIS .msi just add the dependency via "pip install QtWebEngine" and then use "from qgis.PyQt.QtWebEngineWidgets"


   In any case I just installed QGIS in win10 from the OSGeo4W installer adding only the "python3-pyqtwebengine" dependency and your plugin doesn't work. Crashes QGIS startup.

   Maybe do some testing on new installations.


   As for me, since I believe that most users use qgis via the .msi installation, not via OSGeo4W, it is important for me to understand what to have users install and my goal, when I will at least be able to start my plugin, will be to try to automate these dependencies.

   Isn't it the same for you? How do you solve this "problem"?


   For now I noticed this:

   with qgis 3.38.0 .msi installation this dependency is missing:

   qt5-devel (5.15.13-1)
   Qt5 headers and libraries (Development)
   Required by: python3-pyqtwebengine



   with OSGeo4W setup these dependencies are required:

   python3-core (3.12.4-1)
   Python core interpreter and runtime
   Required by: python3-pyqtwebengine, python3-pyqt5, python3-pyqt5-sip
   python3-pyqt5 (5.15.10-1)
   Python bindings for the Qt cross platform application toolkit
   Required by: python3-pyqtwebengine
   python3-pyqt5-sip (12.13.0-1)
   The sip module support for PyQt5
   Required by: python3-pyqtwebengine, python3-pyqt5
   qt5-devel (5.15.13-1)
   Qt5 headers and libraries (Development)
   Required by: python3-pyqtwebengine
   qt5-libs (5.15.13-1)
   Qt5 runtime libraries
   Required by: python3-pyqtwebengine, python3-pyqt5, qt5-devel, qtwebkit-libs


   Andrea Ordonselli

   OpenGIS.it


   Da "Jean-Baptiste Peter" jbpeter at outlook.com

   A "info at opengis.it" info at opengis.it

   Cc "qgis-developer at lists.osgeo.org" qgis-developer at lists.osgeo.org

   Data Tue, 9 Jul 2024 13:19:37 +0000

   Oggetto RE: Re:[QGIS-Developer] Request for Initial Feedback on Layer Atlas Plugin


   Did you install PyQtWebEngine “manually” using pip install? If that is the case, it will not be bundled with qgis and needs to be imported from Pyqt directly:


   ‘from qgis.PyQt.QtWebEngineWidgets import QWebEngineView’


   needs to be replaced by :


   ‘from PyQt5.QtWebEngineWidgets import QWebEngineView’



   As of now, the only way to get this working out of the box is to install qgis with Osgeo4W installer.


   Best,


   Jean-Baptiste Peter


   From: info at opengis.it <info at opengis.it>
   Sent: Tuesday, July 9, 2024 3:01 PM
   To: jbpeter at outlook.com
   Cc: qgis-developer at lists.osgeo.org
   Subject: RE: Re:[QGIS-Developer] Request for Initial Feedback on Layer Atlas Plugin


   OSGeo4W Shell:

   C:\Program Files\QGIS 3.38.0>pip list

   PyQtWebEngine               5.15.6

   PyQtWebEngine-Qt5           5.15.2


   I've PyQtWebEngine dependancy

   Before release make sure it can work.


   Andrea Ordonselli

   OpenGIS.it


   Da "Jean-Baptiste Peter" jbpeter at outlook.com

   A "info at opengis.it" info at opengis.it

   Cc "qgis-developer at lists.osgeo.org" qgis-developer at lists.osgeo.org

   Data Tue, 9 Jul 2024 12:51:12 +0000

   Oggetto RE: Re:[QGIS-Developer] Request for Initial Feedback on Layer Atlas Plugin


   I don’t think this will work with qgis installed using .msi as the installer does not include PyQtWebEngine.


   It should work out of the box using qgis osgeo4W installer which includes the latest version of PyQtWebEngine (5.15.6) which is required for the plugin to work. There should not be any other dependencies.


   Best,


   Jean-Baptiste Peter



   From: info at opengis.it <info at opengis.it>
   Sent: Tuesday, July 9, 2024 2:41 PM
   To: jbpeter at outlook.com
   Cc: qgis-developer at lists.osgeo.org
   Subject: Re:[QGIS-Developer] Request for Initial Feedback on Layer Atlas Plugin


   In a clean install of QGIS 3.38.0, installing the package via the zip downloaded from github, the plugin does not work. The icon is not visible and if I close and reopen QGIS it does not start.

   No message in python console.

   What additional dependencies does it need?

   I use win10 and I installed QGIS via .msi


   Andrea Ordonselli

   OpenGIS.it


   Da "QGIS-Developer" qgis-developer-bounces at lists.osgeo.org

   A "qgis-developer at lists.osgeo.org" qgis-developer at lists.osgeo.org

   Cc

   Data Tue, 9 Jul 2024 09:16:22 +0000

   Oggetto [QGIS-Developer] Request for Initial Feedback on Layer Atlas Plugin


   Dear Developers,


   I have been experimenting for a while with QWebEngineView which opens a lot of possibilities for plugin development and started to implement a new plugin to explore and share layers directly from QGIS by simply dragging and dropping them from the layer panel.


   Here is a short screen recording to see how it works:

   https://www.youtube.com/watch?v=k5k74faBJKo


   As there are a few things remaining to do, the plugin not yet uploaded to the plugin repo but it is mostly functional. Initial feedback from interested testers would be very useful!


   Here is the GitHub repository to try it out:

   https://github.com/jbp35/layer-atlas-plugin/


   Thank you for your time and assistance!


   Best regards,


   Jean-Baptiste Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240711/586cc367/attachment-0001.htm>


More information about the QGIS-Developer mailing list