Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12813

QGraphicsWidget::geometryChanged is not emitted when setPos is called...Also it should be emitted after the resizeEvent....

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.0
    • 4.7.0
    • Widgets: GraphicsView
    • None
    • Linux, KDE.
    • 3ee89bc0830f69d44f272eff5a0c886bff33c92e

    Description

      KDE :

      "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.
      "

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            menard Alexis Menard (closed Nokia identity) (Inactive)
            menard Alexis Menard (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes