On segunda-feira, 14 de maio de 2012 11.46.40, Giuseppe D'Angelo wrote:
> > Actually, I have a better idea: I'll just add an extra pointer to QEvent
> > for the sole reason of letting QGraphicsView use it.
> >
> > If someone thinks that adding 4 or 8 bytes to EVERY EVENT is a bad idea,
> > please help me come up with a better alternative.
>
> A private QEvent subclass carrying that pointer, to be used by QGV?

That occurred to me, but I am not able to implement that safely.

The event seems to be generated by QGraphicsView, then handled in the viewport
event and then passed to QGraphicsScene. But the user might install a subclass
of QGraphicsScene in the view and might inject other events, which would be of
the wrong type and cause a crash.

I cannot guarantee that I wouldn't be breaking anything.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to