void Payment::underMouse(){}
void Payment::on_tableWidget_2_cellEntered(int row, int column){ qDebug()<<__FUNCTION__; if (m_row == row) qDebug()<<"=="; else if (row > m_row) qDebug()<<"up"; else qDebug()<<"down "<<row<<" m-row = "<<m_row;}void Payment::on_tableWidget_2_cellPressed(int row, int column){ m_row = row; qDebug()<<__FUNCTION__;}
C++ (Qt)QTableWidget::verticalScrollBar()->setValue()
void Payment::on_tableWidget_2_cellEntered(int row, int column){ if (row > m_row ) ui->tableWidget_2->verticalScrollBar()->setValue(ui->tableWidget_2->verticalScrollBar()->value()-20); else if (row < m_row) ui->tableWidget_2->verticalScrollBar()->setValue(ui->tableWidget_2->verticalScrollBar()->value()+20);;}void Payment::on_tableWidget_2_cellPressed(int row, int column){ m_row = row;}
if (QApplication::mouseButtons().testFlag(Qt::LeftButton)) { // . . . }
void Payment::on_tableWidget_2_cellEntered(int row, int column){ if (QApplication::mouseButtons().testFlag(Qt::LeftButton)) { if (row > m_row ) ui->tableWidget_2->verticalScrollBar()->setValue(ui->tableWidget_2->verticalScrollBar()->value()-20); else if (row < m_row) ui->tableWidget_2->verticalScrollBar()->setValue(ui->tableWidget_2->verticalScrollBar()->value()+20); ui->tableWidget_2->setCursor(Qt::ClosedHandCursor); } else ui->tableWidget_2->setCursor(Qt::ArrowCursor);}void Payment::on_tableWidget_2_cellPressed(int row, int column){ m_row = row; ui->tableWidget_2->setCursor(Qt::ClosedHandCursor);}void Payment::on_tableWidget_cellEntered(int row, int column){ if (QApplication::mouseButtons().testFlag(Qt::LeftButton)) { if (row > m_row ) ui->tableWidget->verticalScrollBar()->setValue(ui->tableWidget->verticalScrollBar()->value()-20); else if (row < m_row) ui->tableWidget->verticalScrollBar()->setValue(ui->tableWidget->verticalScrollBar()->value()+20); ui->tableWidget->setCursor(Qt::ClosedHandCursor); } else ui->tableWidget->setCursor(Qt::ArrowCursor);}void Payment::on_tableWidget_cellPressed(int row, int column){ m_row = row; ui->tableWidget->setCursor(Qt::ClosedHandCursor);}void Payment::on_tableWidget_3_cellEntered(int row, int column){ if (QApplication::mouseButtons().testFlag(Qt::LeftButton)) { if (row > m_row ) ui->tableWidget_3->verticalScrollBar()->setValue(ui->tableWidget_3->verticalScrollBar()->value()-20); else if (row < m_row) ui->tableWidget_3->verticalScrollBar()->setValue(ui->tableWidget_3->verticalScrollBar()->value()+20); ui->tableWidget_3->setCursor(Qt::ClosedHandCursor); } else ui->tableWidget_3->setCursor(Qt::ArrowCursor);}void Payment::on_tableWidget_3_cellPressed(int row, int column){ m_row = row; ui->tableWidget_3->setCursor(Qt::ClosedHandCursor);}