Hello, I want to create a stackedWidget, if I press the mouse on it, and drag for a given distance, then the stackedWidget will change it current widget. Then how can I implement it? In void QWidget::mouseMoveEvent ( QMouseEvent * event ); I don't know how to get the distance that I moved by mouse. Thanks.