QGraphicsitem emits signal when selected / unselected?
1 answer
You can use itemChange () to get notified about this (or emit your own signal if you really need it from there):
QVariant QGraphicsItem :: itemChange (change GraphicsItemChange, const QVariant and value) [virtual protected]
more or less similar (pseudocode)
QVariant QGraphicsItemSubclass::itemChange( GraphicsItemChange change,
const QVariant &value ) {
if ( change == QGraphicsItem::ItemSelectedChange ) {
if (value == true) {
// Handling selection.. / selection emission
+3
source to share