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

One-line addition to QGraphicsLayout documentation

    XMLWordPrintable

    Details

    • Technical Risk:
      Normal

      Description

      In the documentation of QGraphicsLayout, the section about creating a custom subclass leaves out a very important detail of adding an item to a custom layout. QGraphicsLayoutItem::setParentLayoutItem must be called on the newly added item, or subtle flaws result (such as updateGeometry not propagating).

      I would propose adding something like: When adding an item to your own layout, you must call QGraphicsLayoutItem::setParentLayoutItem to become that item's layout parent, or updateGeometry() will fail to work.

      Placed in a new paragraph, immediately after: Each layout defines its own API for arranging widgets and layout items ... When writing your own layout subclass, you are free to choose the API that best suits your layout.

      There is currently no mention in any documentation that this method must be called for updateGeometry() to work.

        Attachments

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

          Activity

            People

            Assignee:
            teemukat Teemu Katajisto (Inactive)
            Reporter:
            special John Brooks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes