Example #1
0
void ChessBoard::mouseReleaseEvent(QMouseEvent *evt)
{
    if ( evt->button() == Qt::LeftButton )
        leftButtonUp( evt );
    else if ( evt->button() == Qt::RightButton )
        rightButtonUp( evt );
    QWidget::mouseReleaseEvent( evt );
}
Example #2
0
void mouseControl::keyReleased(int key){
    switch (key){
        case    '1':
            leftButtonUp(myMouse);
            break;
        case    '2':
            rightButtonUp(myMouse);
            break;
    }
}