title: qvtkwidget interaction with a slider
body: <p>I have a problem with qvtkwidget. I have a cube with the vtkimageplanewidget and i already made the connection between the sliders and them, but I want the slider to change also when I change the planes with the mouse in the qvtkwidget.</p>
  
  <p>How can i do that?</p>
  
  <p>Here's how I connected the slider eith the planes.</p>
  
  <p>SLOT:</p>
  
  <pre><code>void planevolume::SplaneXpixel()
  {
      double xvalue=ui-&gt;Slider-&gt;value();
      planeX-&gt;SetSliceIndex(xvalue);
      ui-&gt;qvtkWidget-&gt;update();
  }
  </code></pre>
  
  <p>and then:</p>
  
  <pre><code>  connect(ui-&gt;Slider, SIGNAL(valueChanged(double)), this, SLOT(SplaneXpixel()));
  </code></pre>
  
  <p>What about the opposite? I tried:</p>
  
  <p>SLOT:</p>
  
  <pre><code>void planevolume::planeXSpixel()
  {
      double xvalue=planeX-&gt;GetSliceIndex();
      ui-&gt;Slider-&gt;setValue(xvalue);
      ui-&gt;qvtkWidget-&gt;update();
  }
  </code></pre>
  
  <p>and then:</p>
  
  <pre><code>connect(ui-&gt;qvtkWidget, SIGNAL(mouseEvent(QMouseEvent*)), SLOT(planeXSpixel()));
  </code></pre>
  
  <p>but it won't work, can anyone help me?</p>