qgraphicsitem
How to improve QGraphicsView performance in a 2D static scene with many items? (no way to solve it?)
If understood correctly, QGraphicsView is supposed to handle million items efficiently. In my application, I only have some few thousand and the performance is already very bad. When the View is sho[详细]
2023-02-05 18:07 分类:问答Clipping child QGraphicsItems
I have a QGraphicsItem that contains several other QGraphicsItems. How can I ensure that those children items are drawn and clipped against parent item\'s rect when moving t开发者_如何学Pythonhem?Us[详细]
2023-02-05 11:38 分类:问答QGraphicsRectItem::boundingRect() returns a QRectF that is 1px bigger than it should be
Let\'s say I have a QGrahicsRectItem item with item.width=10 and item.height=10. Its top left corner is at (0,0). item.BoundingRect() should return a RectF(0,0,9,9) 开发者_如何学Pythonbut instead it r[详细]
2023-01-27 01:08 分类:问答How to select an QGraphicsItem without selecting whole group (to which this item belongs)
I wonder if it is possible to select item that belongs to one group, without selecting whole group. What I trying to make is a group of items, that can be moved (all items are moved together) but non[详细]
2023-01-23 01:53 分类:问答How to draw a triangle by using QGraphicsView's QGraphicsItem class
I want to draw a triangular object in QGraphicsView by using 开发者_Go百科QGraphicsItem. But I don\'t know how to implement bounding rect according to triangler. You could use a QGraphicsPolygonItem.[详细]
2023-01-20 07:56 分类:问答How to move a QGraphicsItem to another scene without losing the mouse grab?
I have one QGraphicsScene as the main scene with several movable QGraphicsItems in it and another QGraphicsScene on top of the main scene as an overlay. The overlay scene is exactly the same size as t[详细]
2023-01-19 21:57 分类:问答Detect when mouse enter QGraphicsItem with button down
I want to detect when the mouse cursor moves in over a QGraphicsItem while a mouse button is pressed, i.e. the button is pressed before the mouse enters the item. My first idea was to use hoverEnterEv[详细]
2023-01-18 06:17 分类:问答How to anchor QGraphicsWidget/Item (make them static) on QGraphicsView
I want to make something like a hud. I have a QGraphicsScene with a huge QPixmap, that I added to a much smaller QGraphicsView. Now I need to add some control elements, like QLabel, QPushButton and QG[详细]
2023-01-16 03:23 分类:问答QGraphicsView not displaying QGraphicsItems
Using PyQt4. My goal is to load in \"parts\" of a .png, assign them to QGraphicsItems, add them to the scene, and have the QGraphicsView display them. (Right now I don\'t care about their coordinates[详细]
2023-01-15 07:50 分类:问答restrict movable area of qgraphicsitem
Is there a way to restrict the area where a QGraphicsItem like QRect can be moved when setFlag(ItemIsMovable) is set?[详细]
2023-01-12 13:28 分类:问答