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

Setting ItemClipsChildrenToShape force ItemClipsToShape [reg]

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 4.7.2
    • 4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.7.0
    • Widgets: GraphicsView
    • None
    • a8ddc56b1d80b16a3229286d7f0e02323c4203bc , eaeaba06cea2ca0668a3c904744bab06b11077d0

      Please see attached example.

      Parent (black rectangle) has 4 children (blue rectangles) and overloaded shape() method to return shape set by user.
      Shape of the parent is set to circle and QGraphicsItem::ItemClipsChildrenToShape flag is set to true.
      In this configuration children should be clipped to the shape defined, but parent should be entirely visible.
      In Qt 4.5.2 it's the case but in Qt 4.6.0 and later parent gets clipped to the same shape as children.

      Setting QGraphicsItem::ItemClipsToShape on parent to false doesn't change anything.

        1. mainwindow.cpp
          2 kB
          Martin Petersson
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            bjnilsen Bjørn Erik Nilsen
            xcm Martin Petersson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes