View Issue Details

IDProjectCategoryView StatusLast Update
0004527Slicer4Core: Scripting (Wrapping, Python)public2018-03-30 01:03
ReporterjcfrAssigned Tojcfr 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status assignedResolutionopen 
Product Version 
Target VersionbacklogFixed in Version 
Summary0004527: Streamline management of Qt connection in python object.

Following up on, I wonder if it would be helpful to have a mixin similar to slicer.util.VTKObservationMixin but for Qt connection (may be QConnectionMixin).

Then to establish a connection, you would do:

self.connect(object, signal, callback)

with connect method being provided by the mixin.

In the context of the referenced PR, the class would be declared like this:

class FilterParameters(object, QConnectionMixin):
  def __init__(self, parent=None):

  def __del__(self):

  def create(self):
    self.connect(fiducialSelector, "nodeActivated(vtkMRMLNode*)", lambda node,name=name:self.onFiducialListNode(name,node))
TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-03-30 01:03 jcfr New Issue
2018-03-30 01:03 jcfr Status new => assigned
2018-03-30 01:03 jcfr Assigned To => jcfr