<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # QGraphicsItemGroup Class Reference ## [[QtGui](index.htm) module] 該QGraphicsItemGroup類提供一個容器,把一組項目作為一個單獨的項目。[More...](#details) 繼承[QGraphicsItem](qgraphicsitem.html)。 ### Methods * `__init__ (self, QGraphicsItem?parent?=?None, QGraphicsScene?scene?=?None)` * `addToGroup (self, QGraphicsItem?item)` * `QRectF boundingRect (self)` * `bool isObscuredBy (self, QGraphicsItem?item)` * `QPainterPath opaqueArea (self)` * `paint (self, QPainter?painter, QStyleOptionGraphicsItem?option, QWidget?widget?=?None)` * `removeFromGroup (self, QGraphicsItem?item)` * `int type (self)` * * * ## Detailed Description 該QGraphicsItemGroup類提供一個容器,把一組項目作為一個單獨的項目。 一個QGraphicsItemGroup是一種特殊類型的復合項目,對待自身及其所有子作為一個項目(即,所有的事件和幾何形狀為所有兒童都合并在一起) 。這是常見的使用項目組演示工具,當用戶希望將若干較小的項目變成一個大項目,以簡化移動和項目的復制。 如果你想要的是存儲在其它項目的項目,你可以使用任何[QGraphicsItem](qgraphicsitem.html)直接通過傳遞一個合適的父[setParentItem](qgraphicsitem.html#setParentItem)( ) 。 該[boundingRect](qgraphicsitemgroup.html#boundingRect)QGraphicsItemGroup ()函數將返回所有項目的項目組中的邊框。 QGraphicsItemGroup忽略[ItemIgnoresTransformations](qgraphicsitem.html#GraphicsItemFlag-enum)旗上的孩子(即,相對于該組項目的幾何形狀,孩子們被視為好像它們是可轉換的) 。 有兩種方法來構造一個項目組。最簡單和最常用的方法是將項目(例如,所有選定的項目)的列表傳遞給[QGraphicsScene.createItemGroup](qgraphicsscene.html#createItemGroup)( ) ,它返回一個新的QGraphicsItemGroup項目。另一種方法是手動構造一個QGraphicsItemGroup項目,將其添加到場景調用[QGraphicsScene.addItem](qgraphicsscene.html#addItem)( ) ,然后通過調用將項目添加到該組手動,一次一個[addToGroup](qgraphicsitemgroup.html#addToGroup)( ) 。拆除( “取消組合” )的項目組,您可以調用[QGraphicsScene.destroyItemGroup](qgraphicsscene.html#destroyItemGroup)( ) ,或者你也可以手動調用從組中刪除所有項目[removeFromGroup](qgraphicsitemgroup.html#removeFromGroup)( ) 。 ``` // Group all selected items together QGraphicsItemGroup *group = scene->createItemGroup(scene->selecteditems()); // Destroy the group, and delete the group item scene->destroyItemGroup(group); ``` 添加和刪除項目的操作保持了??項目“場景的相對位置和變換,而不是調用[setParentItem](qgraphicsitem.html#setParentItem)( ) ,其中只有子項的父,相對位置和改造被保留。 該addtoGroup ( )函數reparents目標項目這個項目組,保持項目的位置和改造完好相對于場景。視覺上,這意味著項目通過加入[addToGroup](qgraphicsitemgroup.html#addToGroup)( )將保持完全不變,這個操作的結果,而不管該項目或該集團的當前位置或改造的,雖然該項目的位置和矩陣都可能發生變化。 該[removeFromGroup](qgraphicsitemgroup.html#removeFromGroup)( )函數有類似的語義[setParentItem](qgraphicsitem.html#setParentItem)();它reparents的項目到項目組的父項。與[addToGroup](qgraphicsitemgroup.html#addToGroup)( ) ,該項目的場景相對位置和轉型保持不變。 * * * ## Method Documentation ``` QGraphicsItemGroup.__init__ (self, QGraphicsItem?parent?=?None, QGraphicsScene?scene?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 該_scene_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個[QGraphicsItemGroup](qgraphicsitemgroup.html)。_parent_被傳遞給[QGraphicsItem](qgraphicsitem.html)的構造。 **See also** [QGraphicsScene.addItem](qgraphicsscene.html#addItem)( ) 。 ``` QGraphicsItemGroup.addToGroup (self, QGraphicsItem?item) ``` 該_item_說法有它的所有權轉移給Qt的。 將給定_item_和項目的子項到這個項目組。該項目及其子項將被重設父到這個組,但它的位置和相對于場景變換將保持不變。 **See also** [removeFromGroup](qgraphicsitemgroup.html#removeFromGroup)()和[QGraphicsScene.createItemGroup](qgraphicsscene.html#createItemGroup)( ) 。 ``` QRectF QGraphicsItemGroup.boundingRect (self) ``` [](qrectf.html) [從重新實現](qrectf.html)[QGraphicsItem.boundingRect](qgraphicsitem.html#boundingRect)( ) 。 返回該組項目的邊界矩形,它的所有子項。 ``` bool QGraphicsItemGroup.isObscuredBy (self, QGraphicsItem?item) ``` 從重新實現[QGraphicsItem.isObscuredBy](qgraphicsitem.html#isObscuredBy)( ) 。 ``` QPainterPath QGraphicsItemGroup.opaqueArea (self) ``` [](qpainterpath.html) [從重新實現](qpainterpath.html)[QGraphicsItem.opaqueArea](qgraphicsitem.html#opaqueArea)( ) 。 ``` QGraphicsItemGroup.paint (self, QPainter?painter, QStyleOptionGraphicsItem?option, QWidget?widget?=?None) ``` 從重新實現[QGraphicsItem.paint](qgraphicsitem.html#paint)( ) 。 ``` QGraphicsItemGroup.removeFromGroup (self, QGraphicsItem?item) ``` 刪除指定的_item_從本組。該項目將被重設父到這個組的父項,或為0,如果該組沒有父。它的位置和相對于場景變換將保持不變。 **See also** [addToGroup](qgraphicsitemgroup.html#addToGroup)()和[QGraphicsScene.destroyItemGroup](qgraphicsscene.html#destroyItemGroup)( ) 。 ``` int QGraphicsItemGroup.type (self) ``` 從重新實現[QGraphicsItem.type](qgraphicsitem.html#type)( ) 。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看