Description
Show a floating preview of an IC's internal circuit when the user hovers over it, so users can see what's inside without double-clicking.
Implementation Guide
1. Generate preview image
- Render the IC's internal circuit to a QPixmap at reduced scale using
QGraphicsScene::render()
- Cache on the IC element, invalidate when source changes
2. Show on hover
- Override
hoverEnterEvent() in IC to show a custom frameless popup widget
- Dismiss on
hoverLeaveEvent() with a short delay (300ms)
- Limit preview resolution (max 300x200) and skip for very large circuits
Key files
App/Element/IC.h/.cpp — hover events, preview generation
App/Element/ICRegistry.h/.cpp — blob access for embedded ICs
Description
Show a floating preview of an IC's internal circuit when the user hovers over it, so users can see what's inside without double-clicking.
Implementation Guide
1. Generate preview image
QGraphicsScene::render()2. Show on hover
hoverEnterEvent()in IC to show a custom frameless popup widgethoverLeaveEvent()with a short delay (300ms)Key files
App/Element/IC.h/.cpp— hover events, preview generationApp/Element/ICRegistry.h/.cpp— blob access for embedded ICs