我从QGraphicsView派生了一个myView类,把他的信号与MainWindow类的一个public slots相连。
结果发送信号过后,并没有跳入相应的slot函数里面。
...
connect(processedView, SIGNAL(selectRect(QRect *)), this, SLOT(rectFromView(QRect *)));
...
void MyView::mousePressEvent (QMouseEvent *event)
{
QRect *rect;
...
emit selectRect(rect);
}