作者:大爱小哇先森_991 | 来源:互联网 | 2024-12-21 16:28
InmyapplicationIhaveQGraphicsScenewithpixmapaddedandallisviewedinQGraphicsViewwithsc
In my application I have QGraphicsScene with pixmap added and all is viewed in QGraphicsView with scrollbars off. The program window is smaller then pixmap and when I press arrow keys or move mouse wheel the pixmap is being moved.
在我的应用程序中,我添加了带有pixmap的QGraphicsScene,所有内容都在QGraphicsView中查看并关闭了滚动条。程序窗口比pixmap小,当我按箭头键或移动鼠标滚轮时,pixmap正在移动。
How do I disable that so even if the pixmap is bigger than window it won't be moved by keyboard or mouse unless I use my events for that?
如何禁用它,即使像素图大于窗口,它也不会被键盘或鼠标移动,除非我使用我的事件呢?
(I tried to set interactive property to false but that didn't work)
(我试图将交互式属性设置为false但不起作用)
3 个解决方案