Can QWidget detect mouse events on behalf of a QLineEdit?
问题 I have a QWidget that contains QLabels and QLineEdits side by side. When I click on a QLabel, I can use the mousePressEvent in QWidget. But when I click on QLineEdit, I can't detect the mousePressEvent in QWidget - only in the QLineEdit. I think that it is related to how QLineEdit works - I don't know the way to get mouse events within the whole region. EDIT : I have made a custom channel box for Maya like above. I try to select multiple channels by dragging the mouse. But as I mentioned, in