• 3668阅读
  • 0回复

对象间的 信号传递问题 [复制链接]

上一主题 下一主题
离线firetree
 
只看楼主 倒序阅读 楼主  发表于: 2009-04-14
我从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);
}
快速回复
限100 字节
 
上一个 下一个