2

Qt3D introduces Qt3DRender::QPickEvent that can for instance be emitted when a 3D-object is clicked with the mouse.

Why isn't it derived from QEvent, which should be "the base class of all event classes" according to its documentation?

oLen
  • 5,177
  • 1
  • 32
  • 48
  • IMO, this event is "special" in the sense that it was specifically designed for only QObjectPicker to receive. There is no need to inherit from QEvent. Do you have any reason you want it to inherit QEvent in your case? – Steeve Jan 17 '17 at 13:55
  • @Steeve In my opinion it is, conceptually, not very different from QMouseEvent. It fulfills the concept of a QEvent and I think that it being specifically designed for QObjectPicker is no obstacle to derive from it... More concretely, shouldn't it also have an `accept()` and an `ignore()` function? – oLen Jan 17 '17 at 15:27
  • There is a `QPickEvent::setAccepted` but I'm not sure if it implements the same concept. Maybe it could be a good idea to ask the developers of QT about why they have made the decision not to inherit from QEvent. – Steeve Jan 17 '17 at 15:54

0 Answers0