[vtkusers] btkBalloonWidget not showing on QVTKWidget

Leonardo M. Ramé l.rame at griensu.com
Mon Oct 25 10:03:59 EDT 2010


Hi, I'm trying to show a vtkBalloonWiget on a QVTKWidget, but the
balloon is not showing. This is the code I'm using to show the balloon:

void MyWIDGET::ShowBalloon()
{
  m_balloonrep = vtkBalloonRepresentation::New();
  m_balloonrep->SetBalloonLayoutToImageRight();

  m_border = vtkBorderWidget::New();
  m_border->SetInteractor(this->GetInteractor());
  m_border->CreateDefaultRepresentation();
  m_border->On();

  m_balloon = vtkBalloonWidget::New();
  m_balloon->SetInteractor(this->GetInteractor());
  m_balloon->SetRepresentation(m_balloonrep);
  m_balloon->AddBalloon(m_border->GetRepresentation(), "I'm a balloon", NULL);
  m_balloon->EnabledOn();
}

All variables starting with "m_" are members of MyWidget class.

How can I let the balloon show?

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com



More information about the vtkusers mailing list