Re: [QGIS-Developer] Replacing a dialogue with another at runtime with Python

2017-10-03 Thread Ricardo Filipe Soares Garcia da
Hi Dennis On Tue, Oct 3, 2017 at 3:21 PM, Denis Rouzaud wrote: > Hi Ricardo, > > Sorry to bother, but I think this kind of hack should be discouraged. > No bother at all :) I am just playing around with some ideas for improving the WMS layer support. The whole

Re: [QGIS-Developer] Replacing a dialogue with another at runtime with Python

2017-10-03 Thread Denis Rouzaud
Hi Ricardo, Sorry to bother, but I think this kind of hack should be discouraged. This modifies QGIS behavior in a hidden way by replacing native dialogs. And as you pointed, there is probably no way of uninstalling your plugin properly. It will require QGIS to restart to work as expected, which

Re: [QGIS-Developer] Replacing a dialogue with another at runtime with Python

2017-10-03 Thread Ricardo Filipe Soares Garcia da
Hi all Answering my own question for posterity Turns out I can disconnect all slots from a signal by calling `my_action.triggered.disconnect()` without any arguments. My goal of replacing the native QGIS 'Add WMS/WMTS layer' dialogue with another one can be achieved like this: ```python def

[QGIS-Developer] Replacing a dialogue with another at runtime with Python

2017-10-02 Thread Ricardo Filipe Soares Garcia da
Hi all Is it possible to replace one of QGIS' dialogues with a custom one during runtime by using Python? My concrete goal is to replace the dialogue that shows when clicking the 'Add WMS/WMTS Layer' with something custom. I'd like to enhance the native QGIS dialogue with additional elements for