QGraphicsWidget::geometryChanged problem in 4.7

Aaron J. Seigo aseigo at kde.org
Tue Aug 10 23:24:44 CEST 2010


hi Alexis ...

QGraphicsWidget now has a geometryChanged signal in 4.7. Plasma::Applet also
has one. which means we'll need to conditionally compile it out in
 libplasma. so far, not a huge deal.

but there are two problems with QGraphicsWidget::geometryChanged:

0) it is
called before resizeEvent is sent, which means that subclasses have no
chance to do any internal adjustments before the outside world is told that
 geometry is changing

1) it only emits this when setGeometry is called. QGraphicsItem::setPos also
affects the geometry (in fact, setGeometry calls setPos internally), but
there is no signal emitted in this case. meaning that the "geometryChanged"
 signal doesn't actually always get emitted when geometry changes.

:/

without touching Plasma::Applet, we have the problem of the signal being
emitted twice (once from QGraphicsView and once from Plasma::Applet), which
we can just compile out as mentioned above ... if only it worked properly
 :)

do you agree that this should get fixed in Qt?



and then i just need to
 figure out how to make it so that we don't get these errors:

QMetaObject::indexOfSignal: signal geometryChanged() from QGraphicsWidget
 redefined in Plasma::Applet

erf. hopefully QObject::connect is up to the task of connecting two signals
of the same name from two different objects in the inheritance hierarchy. i
 don't have a good feeling about that.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F
 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100810/703cfbf0/attachment.sig 


More information about the Plasma-devel mailing list