bool wasdclick = false;QTimer clicktimer;void ManagerDialog::on_tableWidget_cellClicked(int row, int column){ if( !wasdclick ) // clicktimer.singleShot( QApplication::doubleClickInterval(), this, SLOT(sendClick()) );}void ManagerDialog::on_tableWidget_cellDoubleClicked(int row, int column){ wasdclick = true; qDebug() << "double";}void ManagerDialog::sendClick(){ if( ! wasdclick ) qDebug() << "single"; wasdclick = false;}
// we may get a double click event later if (trigger == SelectedClicked) d->delayedEditing.start(QApplication::doubleClickInterval(), this);