I have a class that is a QTableWidget, and I want to be able to select a row and raise/lower it within the table. I was going to reimplement mouseMoveEvent in combination with a keyboard key or maybe the right mouse button, but I have not been able to get any mouse move events from the method.

i.e. this code does not produce any output. I have tried turning mouse tracking on, with no luck. Any suggestions?

Qt Code:
  1. void MyTable::mouseMouseEvent(QMouseEvent * event)
  2. {
  3. if ( event->button() == Qt::LeftButton )
  4. {
  5. std::cout << "mouse moved" << std::endl;
  6. }
  7. QTableWidget::mouseMoveEvent(event);
  8. }
To copy to clipboard, switch view to plain text mode