Hi Mariane,
I don't see the usage of Qt.UniqueConnection in your example.
This works for me:
def executeSel():
print('selection changed')
layer.selectionChanged.connect(executeSel, Qt.UniqueConnection)
layer.selectionChanged.connect(executeSel, Qt.UniqueConnection)
Traceback (most
Hi Mathias,
Yeah, this is what I knew in theory. Unfortunately this is not the case.
You can try in python console.
Make sure you have a layer with some features.
Define function executeAfterSelection where you do some dummy printing.
Call three times
Hi Marian,
Just tell Qt that it shouldn't create the connection more than once
using Qt::UniqueConnection.
Cheers
Matthias
On 10/2/17 5:30 PM, Tudorache, Marian wrote:
>
>
>
> Hi everyone,
>
>
>
> I have connected the signal selectionChanged so some code, which is
> executed after
Hi everyone,
I have connected the signal selectionChanged so some code, which is executed
after features are selected.
myLayer.selectionChanged.connect(self.executeAfterSelection)
Then I have a method self. executeAfterSelection(self, featuresIds)
The SIGNAl/SLOT tandem works but now I