Qt:防止鼠标移动到QGraphicsScene之外

时间:2014-03-24 16:16:33

标签: c++ qt mouse mousemove qgraphicsscene

如果按下鼠标,我想阻止鼠标移出QGraphicsScene

我尝试使用QCursor::setPos ( 0, 0),但它使用的是屏幕坐标。所以我想我需要将坐标映射到场景中。我知道QWidget::mapToGlobal()已经存在。

有人知道如何将鼠标的可移动区域限制为QGraphicsScene吗?

0 个答案:

没有答案
相关问题