Hi fellow coders:


I am working on a bit of code where I need to find the coordinates of a mouse click on a QwtPlot object. Everything works fine except the very first mouse click is ignored. Here is the initialization code:

Qt Code:
  1. // code snippet ---------------------------------------------------------------------------------
  2. picker = new QwtPlotPicker(btrElement->btrStructure.btr->canvas());
  3. picker->setEnabled(true);
  4. picker->setTrackerPen(QColor(Qt::white));
  5. picker->setTrackerMode(QwtPlotPicker::AlwaysOn);
  6. picker->setStateMachine(new QwtPickerClickPointMachine());
  7. picker->setRubberBand(QwtPicker::RectRubberBand);
  8. connect(picker,
  9. SIGNAL(selected(QPointF)),
  10. this,
  11. SLOT(rcvBTRPointSelected(QPointF)));
To copy to clipboard, switch view to plain text mode 

I would expect that once I click on the QwtPlot object, it would immediately respond to the click via the SLOT/SIGNAL mechanisms that Qt uses. This does happen after the initial click.
As another note: I am using 5 of these plots and each exhibits the very same behavior.
Any help would be greatly appreciated. Thanks.

-jbob