In my program I override the dragEnterEvent but it never called, So that I want to know about when it's called?
UPDATE
Here the code
class RealBoard:public QGraphicsScene
{
public:
RealBoard();
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
//void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
// void mousePressEvent(QGraphicsSceneMouseEvent *event);
};
RealBoard::RealBoard():QGraphicsScene()
{
setSceneRect(-10,-10,620,620);
}
void RealBoard::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
{
exit(0);
// addItem(temp);
}
void RealBoard::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
{
/*
QGraphicsScene::dragLeaveEvent(event);
tempCoin->setZValue(0);
delete temp;
temp=NULL;
*/
exit(0);
}
/*
void RealBoard::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
QGraphicsScene::mousePressEvent(event);
QPointF click=event->buttonDownScenePos(Qt::LeftButton);
if(itemAt(click)!=boardP)
{
itemAt(click)->setZValue(1);
tempCoin=dynamic_cast<QGraphicsPixmapItem *>(itemAt(click));
// exit(0);
temp=new QGraphicsPixmapItem((static_cast<QGraphicsPixmapItem *>(itemAt(click))->pixmap()));
temp->setPos(itemAt(click)->pos());
temp->setZValue(0);
addItem(temp);
update(temp->pos().x(),temp->pos().y(),75,75);
}
}
*/