~/talk

Advanced Qt - A Deep Dive 2/6 Graphics View Part 2

links:none on file
links:none on file
slides:none on file

Custom QGraphicsItem must implement paint() and boundingRect(); shape() is optional but needed for precise hit tests. boundingRect() must be extremely cheap and minimal or performance and hover queries suffer; painting outside the reported rect produces graphical artifacts because QGraphicsView won’t repaint uncovered areas. Use flags like ItemIsMovable, ItemIsSelectable, and ItemSendsGeometryChanges and override itemChange to constrain movement. Collision helpers include collidesWithItem, collidingItems, and scene queries; scene.render can rasterize the whole scene but not conveniently a subtree.

AI-written summary · about

  1. 0:00Introduction to custom items
  2. 1:51Implementing paint and bounding rect
  3. 7:15Shape and event handling
  4. 17:53Event handling levels
  5. 26:41Collision detection methods
  6. 28:45Graph visualization demo
  7. 36:26Summary and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.