Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
105 views

How to get mouse press position relative to QScrollArea's widget

If I have a wide widget in a QScrollArea, and I press the mouse on it, then I get a mouse position (in mousePressEvent()) relative to the scroll area (if I scroll, it changes). How can I get the mouse ...
Alex Nevskiy's user avatar
0 votes
2 answers
2k views

Qt: How to Find the Position of the Mouseclick Relative to an Image

I would like to implement an image editor. I have a QPixmap in a QLabel in a QHBoxLayout. I have overriden the mousePressEvent in the parent widget. When the mousePressedEvent occurs, the event->...
user1396055's user avatar
1 vote
1 answer
2k views

mousePressEvent not working with simple QGraphicsView

I'm studying qt libraries for a project in my university. I'm trying to create a simple window with just a graphicsView into it, catching mouse coordinates only when the cursor is inside the ...
Michael's user avatar
  • 1,015
3 votes
1 answer
11k views

MousePressEvent in view and items in Qt

I have a custom QGraphicsView and a custom QGraphicsItem. I want the Item to handle my click if I click in the item, else I want the click to be handled by the View. But when I click on the item, the ...
fibera's user avatar
  • 495