[QGIS-Developer] Refresh attribute form python action
Hi all, I'm defining a python action that is triggered in the feature form (as a button or from the menu). The action is retrieving some values from other layers and some of these values will update some form widget, avoiding the user to filling them manually (I really simplified the workflow :) ). I think it is by design that QGIS is sending to the data provider the values when the OK button is clicked and then the Save button is clicked, but with the commitChanges() method I can directly send the changes to the provider from the action body. Now the problem: the widgets are not updated unless the form is closed and reopened again. I couldn't find a method to refresh the form widget from the action itself. Is there any? Cheers and thanks! Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] createAlgorithmDialog in Processing script (within plugin)
Just a quick update, the fix is now in master and backported: https://github.com/qgis/QGIS/issues/51971 https://github.com/qgis/QGIS/pull/51985 Thanks to all the devs! Cheers Matteo On 2/22/23 08:33, matteo wrote: Hi Richard, Not very helpful for you, but what about creating an issue with the minimal code to crash? done: https://github.com/qgis/QGIS/issues/51971 I've prepared a minimal algorithm that mimics the problem And about Thread/Crash problems: I have been succesful with the tips of Nyall in: https://lists.osgeo.org/pipermail/qgis-developer/2023-February/065525.html to create a QgsTask which either crashed or gave warnings... One thing I've seen recently is that some Processing algs with me give these "...is run from a different thread than the object lives in ..."-warnings. And my feeling is that if some code is fetching references to the QGIS application instance, it shows this warning. Good luck solving your issue Thanks! Some gurus around? :) Cheers Matteo Regards, Richard On 2/21/23 16:41, matteo via QGIS-Developer wrote: Hi devs, I'm raising this email again because I don't know if this a bug/limitation/correct behavior. I also think that the problem is from a thread point of view, at least by the crash that I have. Knowing that a processing algorithm, as suggested by Germàn, can be created with: processing.createAlgorithmDialog("my_provider:my_algorithm", params) within a plugin, if the algorithm **id** is passed as first argument, QGIS is crashing, while it seems working on a standalone script in the QGIS code editor. Is this a limitation? Cheers and thanks for any suggestion! Matteo On 8/1/22 15:23, matteo wrote: Hi all, I've a set of custom processing scripts within a plugin (that is both "normal" and processing provider plugin). I'm trying to executing the dialog of these algorithm from one of the main plugin file. I found the processing.createAlgorithmDialog [0], but it is constantly crashing when I'm passing the instance of the algorithm: my_alg = MyCustomAlg() my_dialog = my_alg.createAlgorithmDialog(custom_dict) ## crash here Thinking it was a problem of the threads I also tried to overwrite the `flag` method in the algorithm by setting also QgsProcessingAlgorithm.FlagNoThreading but with the same results. I know I can run the processing algorithm with processing.run() but I need to open the dialog pre-filled with custom parameters and to get also some other outputs besides the standard ones (like the QgsFeatureSink path) Thanks for any suggestion Cheers Matteo [0] https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155 ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] createAlgorithmDialog in Processing script (within plugin)
Hi Richard, Not very helpful for you, but what about creating an issue with the minimal code to crash? done: https://github.com/qgis/QGIS/issues/51971 I've prepared a minimal algorithm that mimics the problem And about Thread/Crash problems: I have been succesful with the tips of Nyall in: https://lists.osgeo.org/pipermail/qgis-developer/2023-February/065525.html to create a QgsTask which either crashed or gave warnings... One thing I've seen recently is that some Processing algs with me give these "...is run from a different thread than the object lives in ..."-warnings. And my feeling is that if some code is fetching references to the QGIS application instance, it shows this warning. Good luck solving your issue Thanks! Some gurus around? :) Cheers Matteo Regards, Richard On 2/21/23 16:41, matteo via QGIS-Developer wrote: Hi devs, I'm raising this email again because I don't know if this a bug/limitation/correct behavior. I also think that the problem is from a thread point of view, at least by the crash that I have. Knowing that a processing algorithm, as suggested by Germàn, can be created with: processing.createAlgorithmDialog("my_provider:my_algorithm", params) within a plugin, if the algorithm **id** is passed as first argument, QGIS is crashing, while it seems working on a standalone script in the QGIS code editor. Is this a limitation? Cheers and thanks for any suggestion! Matteo On 8/1/22 15:23, matteo wrote: Hi all, I've a set of custom processing scripts within a plugin (that is both "normal" and processing provider plugin). I'm trying to executing the dialog of these algorithm from one of the main plugin file. I found the processing.createAlgorithmDialog [0], but it is constantly crashing when I'm passing the instance of the algorithm: my_alg = MyCustomAlg() my_dialog = my_alg.createAlgorithmDialog(custom_dict) ## crash here Thinking it was a problem of the threads I also tried to overwrite the `flag` method in the algorithm by setting also QgsProcessingAlgorithm.FlagNoThreading but with the same results. I know I can run the processing algorithm with processing.run() but I need to open the dialog pre-filled with custom parameters and to get also some other outputs besides the standard ones (like the QgsFeatureSink path) Thanks for any suggestion Cheers Matteo [0] https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155 ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] createAlgorithmDialog in Processing script (within plugin)
Hi devs, I'm raising this email again because I don't know if this a bug/limitation/correct behavior. I also think that the problem is from a thread point of view, at least by the crash that I have. Knowing that a processing algorithm, as suggested by Germàn, can be created with: processing.createAlgorithmDialog("my_provider:my_algorithm", params) within a plugin, if the algorithm **id** is passed as first argument, QGIS is crashing, while it seems working on a standalone script in the QGIS code editor. Is this a limitation? Cheers and thanks for any suggestion! Matteo On 8/1/22 15:23, matteo wrote: Hi all, I've a set of custom processing scripts within a plugin (that is both "normal" and processing provider plugin). I'm trying to executing the dialog of these algorithm from one of the main plugin file. I found the processing.createAlgorithmDialog [0], but it is constantly crashing when I'm passing the instance of the algorithm: my_alg = MyCustomAlg() my_dialog = my_alg.createAlgorithmDialog(custom_dict) ## crash here Thinking it was a problem of the threads I also tried to overwrite the `flag` method in the algorithm by setting also QgsProcessingAlgorithm.FlagNoThreading but with the same results. I know I can run the processing algorithm with processing.run() but I need to open the dialog pre-filled with custom parameters and to get also some other outputs besides the standard ones (like the QgsFeatureSink path) Thanks for any suggestion Cheers Matteo [0] https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155 ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Pyqgis master api search broken?
Hi Richard, 3.28 is working fine for me here. I don't see any JQuery related error in the debugging console. Where are you seeing this error? Cheers Matteo On 2/8/23 09:46, Richard Duivenvoorde wrote: Now 3.28 is also 'affected' ? In dev console I see: Uncaught ReferenceError: jQuery is not defined is some jquery cdn failing? Regards, Richard Duivenvoorde On 2023-02-08 09:12, matteo via QGIS-Developer wrote: Hi Denis, Is this related to this? https://github.com/qgis/pyqgis/commit/465d91a265e4f1828f0da623d32f8ac7a1de <https://github.com/qgis/pyqgis/commit/465d91a265e4f1828f0da623d32f8ac7a1de> Matteo, shall we try to revert? not sure about that. I was searching in the docs till yesterday and it was working. Has something changed in the last weeks? Cheers Matteo Cheers, Denis Le mer. 8 févr. 2023 à 08:58, matteo via QGIS-Developer <mailto:qgis-developer@lists.osgeo.org>> a écrit : Hi Richard, I can confirm: searching in master will stay there forever without finding anything. Cheers Matteo On 2/8/23 08:52, Richard Duivenvoorde via QGIS-Developer wrote: > Hi, > > Am I right to conclude something is wrong with PyQGIS api (DOCS build) > for master? > > https://qgis.org/pyqgis/master/search.html <https://qgis.org/pyqgis/master/search.html> > isn't working (missing jQuery?) > while > https://qgis.org/pyqgis/3.28/search.html <https://qgis.org/pyqgis/3.28/search.html> > is working (with me)? > > Others can confirm? > > Regards, > > Richard Duivenvoorde > ___ > QGIS-Developer mailing list > QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Pyqgis master api search broken?
Hi Denis, Is this related to this? https://github.com/qgis/pyqgis/commit/465d91a265e4f1828f0da623d32f8ac7a1de <https://github.com/qgis/pyqgis/commit/465d91a265e4f1828f0da623d32f8ac7a1de> Matteo, shall we try to revert? not sure about that. I was searching in the docs till yesterday and it was working. Has something changed in the last weeks? Cheers Matteo Cheers, Denis Le mer. 8 févr. 2023 à 08:58, matteo via QGIS-Developer mailto:qgis-developer@lists.osgeo.org>> a écrit : Hi Richard, I can confirm: searching in master will stay there forever without finding anything. Cheers Matteo On 2/8/23 08:52, Richard Duivenvoorde via QGIS-Developer wrote: > Hi, > > Am I right to conclude something is wrong with PyQGIS api (DOCS build) > for master? > > https://qgis.org/pyqgis/master/search.html <https://qgis.org/pyqgis/master/search.html> > isn't working (missing jQuery?) > while > https://qgis.org/pyqgis/3.28/search.html <https://qgis.org/pyqgis/3.28/search.html> > is working (with me)? > > Others can confirm? > > Regards, > > Richard Duivenvoorde > ___ > QGIS-Developer mailing list > QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Pyqgis master api search broken?
Hi Richard, I can confirm: searching in master will stay there forever without finding anything. Cheers Matteo On 2/8/23 08:52, Richard Duivenvoorde via QGIS-Developer wrote: Hi, Am I right to conclude something is wrong with PyQGIS api (DOCS build) for master? https://qgis.org/pyqgis/master/search.html isn't working (missing jQuery?) while https://qgis.org/pyqgis/3.28/search.html is working (with me)? Others can confirm? Regards, Richard Duivenvoorde ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Autocomplete python code in QGIS compiled
great! On 1/30/23 00:40, Nyall Dawson wrote: On Tue, 10 Jan 2023 at 02:13, matteo via QGIS-Developer wrote: Hi all, maybe that's a silly question, but with all the self compiled QGIS versions that I have (3.22, 3.28, master, ecc) QGIS is not autocompleting the code, not in the console, editor, Processing script, macros, etc etc. With the QGIS 3.22, but again the version seems not be the problem, installed from packages, the autocompletion works as expected. Is there a parameter in the cmake that I have to adjust or is this behavior expected? It was broken -- but has been fixed by Jürgen and is all working now. What we need now is someone with some insight into how the 3rd party .api files in https://github.com/qgis/QGIS/tree/master/python/qsci_apis were generated and how we can update these to recent library versions... Nyall p.s. working on a Debian Sid OS Cheers and thanks! Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] [solved] weird RuntimeError: qgis._gui cannot import type '����' from PytQT5.QtCore"
Hi Evan, thanks, it works! Cheers Matteo On 1/30/23 15:45, Even Rouault via QGIS-Developer wrote: Hi, just to avoid other people losing a couple hours like me... If you update to latest master on Debian/Ubuntu, and after rebuild, you get a cryptic error like the following when importing qgis_gui: # PYTHONPATH=output/python QGIS_PREFIX_PATH=output python3 -c "from qgis._gui import *" Traceback (most recent call last): File "", line 1, in RuntimeError: qgis._gui cannot import type '' from PyQt5.QtCore Then the fix is to install python3-pyqt5.qtmultimedia. Cf https://github.com/qgis/QGIS/commit/324dac16696bff43d637920733eb5ee4cb7b3ddf Thanks to Alessandro for hinting me on the right direction. I'd wish PyQt would output a better error message... Even ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] PyQt db_manager(?) compile error
Hi Richard, same here. On Debian with a new folder and a fresh compilation. Did you solved? make[2]: *** [python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:90: python/plugins/db_manager/ui_DlgCancelTaskQuery.py] Error 1 make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCancelTaskQuery.py' make[2]: *** [python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:98: python/plugins/db_manager/ui_DlgCreateIndex.py] Error 1 make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCreateIndex.py' make[2]: *** [python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:102: python/plugins/db_manager/ui_DlgCreateTable.py] Error 1 make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCreateTable.py' An unexpected error occurred. Check that you are using the latest version of PyQt5 and send an error report to supp...@riverbankcomputing.com, including the following information: * your version of PyQt (5.15.8) * the UI file that caused this error * the debug output of pyuic5 (use the -d flag when calling pyuic5) make[2]: *** [python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:94: python/plugins/db_manager/ui_DlgCreateConstraint.py] Error 1 make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCreateConstraint.py' make[1]: *** [CMakeFiles/Makefile2:6344: python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/all] Error 2 Cheers Matteo On 1/27/23 13:23, Richard Duivenvoorde via QGIS-Developer wrote: Hi, Compiling master on Debian Testing today, I first was presented with a new dependency Qt5Multimedia (hopefully we can soon use QGIS as a Spotify client ;-) ), which was installable. But then my (fresh) build stalls at: [9773/9812] Generating ui_DlgAddGeometryColumn.py FAILED: python/plugins/db_manager/ui_DlgAddGeometryColumn.py /home/richard/git/qgis/build/python/plugins/db_manager/ui_DlgAddGeometryColumn.py cd /home/richard/git/qgis/build/python/plugins/db_manager && /home/richard/git/qgis/scripts/pyuic_wrapper.sh /usr/bin/pyuic5 /home/richard/git/qgis/build/output/lib /home/richard/git/qgis/build/output/python /usr/bin/python3 /home/richard/git/qgis/python/plugins/db_manager/ui/DlgAddGeometryColumn.ui -o /home/richard/git/qgis/build/python/plugins/db_manager/ui_DlgAddGeometryColumn.py An unexpected error occurred. Check that you are using the latest version of PyQt5 and send an error report to supp...@riverbankcomputing.com, including the following information: * your version of PyQt (5.15.7) * the UI file that caused this error * the debug output of pyuic5 (use the -d flag when calling pyuic5) Others have that issue? Running pyuic -d on one of the errors seems fine (see below). Regards, Richard Duivenvoorde /usr/bin/pyuic5 -d /home/richard/git/qgis/python/plugins/db_manager/ui/DlgExportVector.ui PyQt5.uic.uiparser: uiname is DbManagerDlgExportVector PyQt5.uic.uiparser: toplevel widget is QDialog PyQt5.uic.properties: setting property geometry PyQt5.uic.properties: setting property windowTitle PyQt5.uic.uiparser: push QDialog DbManagerDlgExportVector PyQt5.uic.uiparser: push QGridLayout gridLayout_2 PyQt5.uic.properties: setting property text PyQt5.uic.uiparser: push QLineEdit editOutputFile PyQt5.uic.uiparser: pop widget QLineEdit editOutputFile PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector PyQt5.uic.properties: setting property orientation PyQt5.uic.properties: setting property standardButtons PyQt5.uic.uiparser: push QDialogButtonBox buttonBox PyQt5.uic.uiparser: pop widget QDialogButtonBox buttonBox PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector PyQt5.uic.uiparser: push QComboBox cboFileFormat PyQt5.uic.uiparser: pop widget QComboBox cboFileFormat PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector PyQt5.uic.properties: setting property sizePolicy PyQt5.uic.properties: setting property text PyQt5.uic.uiparser: push QLabel label_5 PyQt5.uic.uiparser: pop widget QLabel label_5 PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector PyQt5.uic.properties: setting property title PyQt5.uic.uiparser: push QGroupBox groupBox_2 PyQt5.uic.uiparser: push QGridLayout gridLayout PyQt5.uic.properties: setting property text PyQt5.uic.uiparser: push QCheckBox chkDropTable PyQt5.uic.uiparser: pop widget QCheckBox chkDropTable PyQt5.uic.uiparser: new topwidget self.groupBox_2 PyQt5.uic.uiparser: push QHBoxLayout horizontalLayout PyQt5.uic.properties: setting property text PyQt5.uic.uiparser: push QCheckBox chkSourceSrid PyQt5.uic.uiparser: pop widget QCheckBox chkSourceSrid PyQt5.uic.uiparser: new topwidget self.groupBox_2 PyQt5.uic.properties: setting property enabled PyQt5.uic.properties: setting property text PyQt5.uic.uiparser: push QLineEdit editSourceSrid PyQt5.uic.uiparser: pop widget QLineEdit editSourceSrid PyQt5.uic.uiparser: new topwidget self.groupBox_2 PyQt5.uic.properties: setting property text
Re: [QGIS-Developer] Statistics of QGIS downloads
Hi Andreas, thanks, I couldn't find the link anymore Cheers Matteo On 1/24/23 16:08, Andreas Neumann wrote: Hi Matteo, See https://analytics.qgis.org/ <https://analytics.qgis.org/> and https://blog.qgis.org/2022/06/16/qgis-userbase-analytics/ <https://blog.qgis.org/2022/06/16/qgis-userbase-analytics/> Greetings, Andreas On Tue, 24 Jan 2023 at 16:05, matteo via QGIS-Developer mailto:qgis-developer@lists.osgeo.org>> wrote: Hi all, if I'm not wrong (Tim?) there was kind of dashboard to see the download statistics of QGIS, but I cannot find it anymore. Is there a link available? Cheers and thanks Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> -- -- Andreas Neumann QGIS.ORG <http://QGIS.ORG> board member (treasurer) ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] Statistics of QGIS downloads
Hi all, if I'm not wrong (Tim?) there was kind of dashboard to see the download statistics of QGIS, but I cannot find it anymore. Is there a link available? Cheers and thanks Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] Autocomplete python code in QGIS compiled
Hi all, maybe that's a silly question, but with all the self compiled QGIS versions that I have (3.22, 3.28, master, ecc) QGIS is not autocompleting the code, not in the console, editor, Processing script, macros, etc etc. With the QGIS 3.22, but again the version seems not be the problem, installed from packages, the autocompletion works as expected. Is there a parameter in the cmake that I have to adjust or is this behavior expected? p.s. working on a Debian Sid OS Cheers and thanks! Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Skip loading plugin if errors
Hi Germàn, I successfully used also your code and it really works perfectly. Thanks for sharing it! Cheers Matteo On 12/28/22 10:40, Germán Carrillo wrote: Hi Matteo, I've added a few validations for this plugin to gently inform users of missing dependencies: https://github.com/SwissTierrasColombia/Asistente-LADM-COL/blob/master/asistente_ladm_col/__init__.py <https://github.com/SwissTierrasColombia/Asistente-LADM-COL/blob/master/asistente_ladm_col/__init__.py> Hope that helps. Regards, Germán El mié, 28 dic 2022 a las 9:58, matteo via QGIS-Developer (<mailto:qgis-developer@lists.osgeo.org>>) escribió: Hi devs, I'm developing a Processing provider plugin that needs some external python packages. If these are not installed on the system, when starting QGIS and loading the plugin the error message pops up (of course). Is there a way to have a "more friendly" message without opening the Stacktrace? For example creating a messagebox/bar with the message "Install the package.. else you cannot use the plugin" I've added a simple try/except in the plugin classFactory method but I'm still stuck in the loop somewhere. Thanks for any suggestion Cheers Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> -- --- |\__ (:>__)( |/ Soluciones Geoinformáticas Libres http://geotux.tuxfamily.org/ <http://geotux.tuxfamily.org/> https://twitter.com/GeoTux2 <http://twitter.com/GeoTux2> <http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Skip loading plugin if errors
Another solution, not the best one and working just because the plugin is a Processing provider would be to put try: import external_library except ImportError: raise QgsProcessingException(self.tr('This algorithm requires the Python .. library. Please install this library and try again.')) within the processAlgorithm method. I know that if there are many algorithms you have to repeat the code for each one, and that if the algorithm has many parameters, the user fills all of them and it's not nice to inform after, but :) Cheers Matteo On 12/28/22 10:40, Germán Carrillo wrote: Hi Matteo, I've added a few validations for this plugin to gently inform users of missing dependencies: https://github.com/SwissTierrasColombia/Asistente-LADM-COL/blob/master/asistente_ladm_col/__init__.py <https://github.com/SwissTierrasColombia/Asistente-LADM-COL/blob/master/asistente_ladm_col/__init__.py> Hope that helps. Regards, Germán El mié, 28 dic 2022 a las 9:58, matteo via QGIS-Developer (<mailto:qgis-developer@lists.osgeo.org>>) escribió: Hi devs, I'm developing a Processing provider plugin that needs some external python packages. If these are not installed on the system, when starting QGIS and loading the plugin the error message pops up (of course). Is there a way to have a "more friendly" message without opening the Stacktrace? For example creating a messagebox/bar with the message "Install the package.. else you cannot use the plugin" I've added a simple try/except in the plugin classFactory method but I'm still stuck in the loop somewhere. Thanks for any suggestion Cheers Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> -- --- |\__ (:>__)( |/ Soluciones Geoinformáticas Libres http://geotux.tuxfamily.org/ <http://geotux.tuxfamily.org/> https://twitter.com/GeoTux2 <http://twitter.com/GeoTux2> <http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Skip loading plugin if errors
Hola Germàn, thanks for the suggestion! I'll try and let you know Cheers Matteo On 12/28/22 10:40, Germán Carrillo wrote: Hi Matteo, I've added a few validations for this plugin to gently inform users of missing dependencies: https://github.com/SwissTierrasColombia/Asistente-LADM-COL/blob/master/asistente_ladm_col/__init__.py <https://github.com/SwissTierrasColombia/Asistente-LADM-COL/blob/master/asistente_ladm_col/__init__.py> Hope that helps. Regards, Germán El mié, 28 dic 2022 a las 9:58, matteo via QGIS-Developer (<mailto:qgis-developer@lists.osgeo.org>>) escribió: Hi devs, I'm developing a Processing provider plugin that needs some external python packages. If these are not installed on the system, when starting QGIS and loading the plugin the error message pops up (of course). Is there a way to have a "more friendly" message without opening the Stacktrace? For example creating a messagebox/bar with the message "Install the package.. else you cannot use the plugin" I've added a simple try/except in the plugin classFactory method but I'm still stuck in the loop somewhere. Thanks for any suggestion Cheers Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> -- --- |\__ (:>__)( |/ Soluciones Geoinformáticas Libres http://geotux.tuxfamily.org/ <http://geotux.tuxfamily.org/> https://twitter.com/GeoTux2 <http://twitter.com/GeoTux2> <http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] Skip loading plugin if errors
Hi devs, I'm developing a Processing provider plugin that needs some external python packages. If these are not installed on the system, when starting QGIS and loading the plugin the error message pops up (of course). Is there a way to have a "more friendly" message without opening the Stacktrace? For example creating a messagebox/bar with the message "Install the package.. else you cannot use the plugin" I've added a simple try/except in the plugin classFactory method but I'm still stuck in the loop somewhere. Thanks for any suggestion Cheers Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Building pyqgis doc locally
you might need to copy the folder, same than for _templates: see https://github.com/qgis/pyqgis/search?q=_templates <https://github.com/qgis/pyqgis/search?q=_templates> this approach seems working (at least locally). I've made a PR: https://github.com/qgis/pyqgis/pull/101 Cheers and thanks for the help Matteo> otherwise, look at https://github.com/qgis/pyqgis/pull/89/files?w=1 <https://github.com/qgis/pyqgis/pull/89/files?w=1> Le mar. 13 déc. 2022 à 09:12, matteo <mailto:matteo.ghe...@gmail.com>> a écrit : Hi Denis, > yes you can limit what you build > see https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh <https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh> > <https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh <https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh>> > > either use --package core/gui/… or --class QgsVector (which will work as > QgsVector*) thanks, it works as expected! Last (hopefully :) ) question: I'm adding some custom css in the _static/css/custom.css file. I've also added: html_static_path = ['_static'] html_css_files = [ 'css/custom.css', ] in the conf.py.in <http://conf.py.in> file, but when compiling sphinx is complaining: WARNING: html_static_path entry '_static' does not exist Do you have any idea why this is happening? Cheers and thanks again Matteo > > > > > Another approach is to do a PR on the repo, you will have a built > > example at https://qgis.org/pyqgis/master_PRXX <https://qgis.org/pyqgis/master_PRXX> > <https://qgis.org/pyqgis/master_PRXX <https://qgis.org/pyqgis/master_PRXX>> > > <https://qgis.org/pyqgis/master_PRXX <https://qgis.org/pyqgis/master_PRXX> > <https://qgis.org/pyqgis/master_PRXX <https://qgis.org/pyqgis/master_PRXX>>> (replace XX) when it's finished. > > and this can be done also to the forked repository right? > > > you would need to enable the pages on your repo, I am not sure this will > work out-of-the-box. > > > > I believe it would require a bit of love to improve this workflow > and > > drop the gh-pages branch. > > > > I hope this helps a bit. > > Thanks Denis > > Matteo > > > > Cheers, > > Denis > > > > > > > > Le mar. 13 déc. 2022 à 08:14, matteo via QGIS-Developer > > mailto:qgis-developer@lists.osgeo.org> > <mailto:qgis-developer@lists.osgeo.org <mailto:qgis-developer@lists.osgeo.org>> > <mailto:qgis-developer@lists.osgeo.org <mailto:qgis-developer@lists.osgeo.org> > <mailto:qgis-developer@lists.osgeo.org <mailto:qgis-developer@lists.osgeo.org>>>> > > a écrit : > > > > Hi devs, > > > > I've some small ideas to enhance the readthedocs theme of the > pyqgis > > documentation and I want make some local test before making a > pull > > request. > > > > I've cloned this repository (around 7GB?!): > > > > https://github.com/qgis/pyqgis <https://github.com/qgis/pyqgis> <https://github.com/qgis/pyqgis <https://github.com/qgis/pyqgis>> > <https://github.com/qgis/pyqgis <https://github.com/qgis/pyqgis> <https://github.com/qgis/pyqgis <https://github.com/qgis/pyqgis>>> > > > > and then I followed the instruction of the Readme file. It seems > > building but it is literally taking ages (./build-docs.sh > > -qgis-build-dir /home/matteo/dev/qgis-master/). > > > > Am I doing something wrong or can I use some shortcut to > build it? I'm > > just playing with some css and eventually the config.py.in <http://config.py.in> > <http://config.py.in <http://config.py.in>> > > <http://config.py.in <http://config.py.in> <http://config.py.in <http://config.py.in>>> file. > > > > Cheers and thanks for any advice > > > > Matteo > > > > ___
Re: [QGIS-Developer] Building pyqgis doc locally
Hi Denis, yes you can limit what you build see https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh <https://github.com/qgis/pyqgis/blob/master/scripts/build-docs.sh> either use --package core/gui/… or --class QgsVector (which will work as QgsVector*) thanks, it works as expected! Last (hopefully :) ) question: I'm adding some custom css in the _static/css/custom.css file. I've also added: html_static_path = ['_static'] html_css_files = [ 'css/custom.css', ] in the conf.py.in file, but when compiling sphinx is complaining: WARNING: html_static_path entry '_static' does not exist Do you have any idea why this is happening? Cheers and thanks again Matteo > Another approach is to do a PR on the repo, you will have a built > example at https://qgis.org/pyqgis/master_PRXX <https://qgis.org/pyqgis/master_PRXX> > <https://qgis.org/pyqgis/master_PRXX <https://qgis.org/pyqgis/master_PRXX>> (replace XX) when it's finished. and this can be done also to the forked repository right? you would need to enable the pages on your repo, I am not sure this will work out-of-the-box. > I believe it would require a bit of love to improve this workflow and > drop the gh-pages branch. > > I hope this helps a bit. Thanks Denis Matteo > Cheers, > Denis > > > > Le mar. 13 déc. 2022 à 08:14, matteo via QGIS-Developer > mailto:qgis-developer@lists.osgeo.org> <mailto:qgis-developer@lists.osgeo.org <mailto:qgis-developer@lists.osgeo.org>>> > a écrit : > > Hi devs, > > I've some small ideas to enhance the readthedocs theme of the pyqgis > documentation and I want make some local test before making a pull > request. > > I've cloned this repository (around 7GB?!): > > https://github.com/qgis/pyqgis <https://github.com/qgis/pyqgis> <https://github.com/qgis/pyqgis <https://github.com/qgis/pyqgis>> > > and then I followed the instruction of the Readme file. It seems > building but it is literally taking ages (./build-docs.sh > -qgis-build-dir /home/matteo/dev/qgis-master/). > > Am I doing something wrong or can I use some shortcut to build it? I'm > just playing with some css and eventually the config.py.in <http://config.py.in> > <http://config.py.in <http://config.py.in>> file. > > Cheers and thanks for any advice > > Matteo > > ___ > QGIS-Developer mailing list > QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> <mailto:QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org>> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> > <https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> > <https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>> > ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] Building pyqgis doc locally
Hi Denis, The main issue is that the website is added to a branch (gh-pages) and is versioned. From time to time, I squash the commits and force push to avoid such a large size (obviously, it's been a while since I didn't do it). I am a bit reluctant at squashing / force pushing directly from the workflow as any error would mean losing the pages (potentially losing the older versions). By fetching only the master branch you should be better. got it, thanks Then, building docs shouldn't take too long. What duration are you experiencing? just reading sources it's more than 10 minutes while building the documentation is still running (so more or less 30 minutes). I don't understand if/where I can skip sources and compile just a small small part of the documentation since what I want to to is only theme related. Another approach is to do a PR on the repo, you will have a built example at https://qgis.org/pyqgis/master_PRXX <https://qgis.org/pyqgis/master_PRXX> (replace XX) when it's finished. and this can be done also to the forked repository right? I believe it would require a bit of love to improve this workflow and drop the gh-pages branch. I hope this helps a bit. Thanks Denis Matteo Cheers, Denis Le mar. 13 déc. 2022 à 08:14, matteo via QGIS-Developer mailto:qgis-developer@lists.osgeo.org>> a écrit : Hi devs, I've some small ideas to enhance the readthedocs theme of the pyqgis documentation and I want make some local test before making a pull request. I've cloned this repository (around 7GB?!): https://github.com/qgis/pyqgis <https://github.com/qgis/pyqgis> and then I followed the instruction of the Readme file. It seems building but it is literally taking ages (./build-docs.sh -qgis-build-dir /home/matteo/dev/qgis-master/). Am I doing something wrong or can I use some shortcut to build it? I'm just playing with some css and eventually the config.py.in <http://config.py.in> file. Cheers and thanks for any advice Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] Building pyqgis doc locally
Hi devs, I've some small ideas to enhance the readthedocs theme of the pyqgis documentation and I want make some local test before making a pull request. I've cloned this repository (around 7GB?!): https://github.com/qgis/pyqgis and then I followed the instruction of the Readme file. It seems building but it is literally taking ages (./build-docs.sh -qgis-build-dir /home/matteo/dev/qgis-master/). Am I doing something wrong or can I use some shortcut to build it? I'm just playing with some css and eventually the config.py.in file. Cheers and thanks for any advice Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] createAlgorithmDialog in Processing script (within plugin)
Hi Germàn, If you want and if you have the time, we could have a look at this issue at the QGIS Contributors Meeting in Firenze :) that's great, see you very soon! Cheers! Matteo Regards! Germán El lun, 1 ago 2022 a las 17:07, matteo (<mailto:matteo.ghe...@gmail.com>>) escribió: Hi German, yes in your way it is working. But what if you try not with the algorithm/model id, but with an instance of the algorithm? In the docs I read "Either an instance of an algorithm, or an algorithm's ID", therefore I'm trying to set up an instance of my algorithm and then passing it to the method Cheers and thanks Matteo On 8/1/22 16:17, Germán Carrillo wrote: > Hi Matteo, > > I've been successfully using /execAlgorithmDialog()/ instead [0]: > > /processing.execAlgorithmDialog("my_provider:my_algorithm", params)/ > > where, /params/ is a dict with the pre-filled values you have. You can > see an example at [1]. > > Regards, > > Germán > --- > [0] > https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185 <https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185> <https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185 <https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185>> > [1] > https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140 <https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140> <https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140 <https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140>> > > > El lun, 1 ago 2022 a las 15:23, matteo via QGIS-Developer > (mailto:qgis-developer@lists.osgeo.org> > <mailto:qgis-developer@lists.osgeo.org <mailto:qgis-developer@lists.osgeo.org>>>) escribió: > > Hi all, > > I've a set of custom processing scripts within a plugin (that is both > "normal" and processing provider plugin). > > I'm trying to executing the dialog of these algorithm from one of the > main plugin file. I found the processing.createAlgorithmDialog [0], but > it is constantly crashing when I'm passing the instance of the > algorithm: > > my_alg = MyCustomAlg() > my_dialog = my_alg.createAlgorithmDialog(custom_dict) > > ## crash here > > Thinking it was a problem of the threads I also tried to overwrite the > `flag` method in the algorithm by setting also > QgsProcessingAlgorithm.FlagNoThreading but with the same results. > > I know I can run the processing algorithm with processing.run() but > I need to open the dialog pre-filled with custom parameters and to get > also some other outputs besides the standard ones (like the > QgsFeatureSink path) > > Thanks for any suggestion > > Cheers > > Matteo > > > [0] > https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155 <https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155> <https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155 <https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155>> > > ___ > QGIS-Developer mailing list > QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> <mailto:QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org>> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> > <https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer>> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> > <https://lists
Re: [QGIS-Developer] createAlgorithmDialog in Processing script (within plugin)
Hi German, yes in your way it is working. But what if you try not with the algorithm/model id, but with an instance of the algorithm? In the docs I read "Either an instance of an algorithm, or an algorithm's ID", therefore I'm trying to set up an instance of my algorithm and then passing it to the method Cheers and thanks Matteo On 8/1/22 16:17, Germán Carrillo wrote: Hi Matteo, I've been successfully using /execAlgorithmDialog()/ instead [0]: /processing.execAlgorithmDialog("my_provider:my_algorithm", params)/ where, /params/ is a dict with the pre-filled values you have. You can see an example at [1]. Regards, Germán --- [0] https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185 <https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185> [1] https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140 <https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140> El lun, 1 ago 2022 a las 15:23, matteo via QGIS-Developer (<mailto:qgis-developer@lists.osgeo.org>>) escribió: Hi all, I've a set of custom processing scripts within a plugin (that is both "normal" and processing provider plugin). I'm trying to executing the dialog of these algorithm from one of the main plugin file. I found the processing.createAlgorithmDialog [0], but it is constantly crashing when I'm passing the instance of the algorithm: my_alg = MyCustomAlg() my_dialog = my_alg.createAlgorithmDialog(custom_dict) ## crash here Thinking it was a problem of the threads I also tried to overwrite the `flag` method in the algorithm by setting also QgsProcessingAlgorithm.FlagNoThreading but with the same results. I know I can run the processing algorithm with processing.run() but I need to open the dialog pre-filled with custom parameters and to get also some other outputs besides the standard ones (like the QgsFeatureSink path) Thanks for any suggestion Cheers Matteo [0] https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155 <https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <https://lists.osgeo.org/mailman/listinfo/qgis-developer> -- --- |\__ (:>__)( |/ Soluciones Geoinformáticas Libres http://geotux.tuxfamily.org/ <http://geotux.tuxfamily.org/> https://twitter.com/GeoTux2 <http://twitter.com/GeoTux2> <http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] createAlgorithmDialog in Processing script (within plugin)
Hi all, I've a set of custom processing scripts within a plugin (that is both "normal" and processing provider plugin). I'm trying to executing the dialog of these algorithm from one of the main plugin file. I found the processing.createAlgorithmDialog [0], but it is constantly crashing when I'm passing the instance of the algorithm: my_alg = MyCustomAlg() my_dialog = my_alg.createAlgorithmDialog(custom_dict) ## crash here Thinking it was a problem of the threads I also tried to overwrite the `flag` method in the algorithm by setting also QgsProcessingAlgorithm.FlagNoThreading but with the same results. I know I can run the processing algorithm with processing.run() but I need to open the dialog pre-filled with custom parameters and to get also some other outputs besides the standard ones (like the QgsFeatureSink path) Thanks for any suggestion Cheers Matteo [0] https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155 ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] QgsVectorLayerSaveAsDialog in python plugin
Hi Andrea, thanks for the information, I missed that. So no way to reuse some existing pyqgis API right? Cheers Matteo On 7/27/22 11:39, Andrea Giudiceandrea via QGIS-Developer wrote: Hi Matteo, there's also a one years old Feature Request [1]. Best regards. Andrea Giudiceandrea [1] https://github.com/qgis/QGIS/issues/45538 Il 27/07/2022 11:20, matteo via QGIS-Developer ha scritto: I discovered that the QgsVectorLayerSaveAsDialog is not available in python bindings [0]. ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] QgsVectorLayerSaveAsDialog in python plugin
Hi all, I discovered that the QgsVectorLayerSaveAsDialog is not available in python bindings [0]. I have the need to export vector layers from a plugin with a similar dialog (with few options compared to the QGIS one). Should I create a custom UI and python class or is another way to have the similar functionalities with other python classes (with UI of course :) )? Cheers and thanks for any suggestion! Matteo [0] https://api.qgis.org/api/classQgsVectorLayerSaveAsDialog.html#details ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] Selection opacity raster image fill QGIS
Hi all, it seems that the opacity of the selection color chosen in the project properties is ignored with a vector layer in raster fill symbology mode. Is this a bug or the expected behavior? Cheers and thanks Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer