[commonqt-devel] QGraphicsScene's mousemove event

Hi! I found a strange thing. QGraphicsScene's mousemove event would not be triggered if the scene is empty. Actually if I only add a line item, mousemove event will not be triggered either. Only after a text is added, mousemove event is ok. It's no big deal because I could add an empty text to get everything work, but I'd like to know what's wrong (perhaps I've misunderstood something?) I can send you relavent codes if you need, but they're too big to post here. - Rujia

Rujia Liu <rujia.liu@gmail.com> writes:
Hi!
I found a strange thing. QGraphicsScene's mousemove event would not be triggered if the scene is empty. Actually if I only add a line item, mousemove event will not be triggered either. Only after a text is added, mousemove event is ok.
It's no big deal because I could add an empty text to get everything work, but I'd like to know what's wrong (perhaps I've misunderstood something?)
I can send you relavent codes if you need, but they're too big to post here. As I replied in a private email, for posterity here: http://qt-project.org/doc/qt-4.8/qwidget.html#mouseTracking-prop setMouseTracking need to be set on QGraphicsView.
-- With best regards, Stas.

Oh! How could I miss that :) On Thu, Sep 12, 2013 at 9:53 PM, Stas Boukarev <stassats@gmail.com> wrote:
Rujia Liu <rujia.liu@gmail.com> writes:
Hi!
I found a strange thing. QGraphicsScene's mousemove event would not be triggered if the scene is empty. Actually if I only add a line item, mousemove event will not be triggered either. Only after a text is added, mousemove event is ok.
It's no big deal because I could add an empty text to get everything work, but I'd like to know what's wrong (perhaps I've misunderstood something?)
I can send you relavent codes if you need, but they're too big to post here. As I replied in a private email, for posterity here: http://qt-project.org/doc/qt-4.8/qwidget.html#mouseTracking-prop setMouseTracking need to be set on QGraphicsView.
-- With best regards, Stas.
participants (2)
-
Rujia Liu
-
Stas Boukarev