jiapei100
14th May 2010, 01:48
Hi, all:
I created a class "CqtImageView" which inherits from QGraphicsView, in which I overwrite mousePressEvent
class CqtImageView : public QGraphicsView
{
...
void mousePressEvent(QMouseEvent *event);
...
}
One "CqtImageView" object is further created in the "Ui" of my main class,
class CMyMain : public QMainWindow
{
...
Ui::mymainClass ui;
...
}
this ui contains a "CqtImageView" widget.
I would like to count the mouse pressed times over the CqtImageView in CMyMain class.
Therefore, I may need an signal-slot to inform CMyMain when mousePressEvent happens.
How to?
Cheers
JIA
I created a class "CqtImageView" which inherits from QGraphicsView, in which I overwrite mousePressEvent
class CqtImageView : public QGraphicsView
{
...
void mousePressEvent(QMouseEvent *event);
...
}
One "CqtImageView" object is further created in the "Ui" of my main class,
class CMyMain : public QMainWindow
{
...
Ui::mymainClass ui;
...
}
this ui contains a "CqtImageView" widget.
I would like to count the mouse pressed times over the CqtImageView in CMyMain class.
Therefore, I may need an signal-slot to inform CMyMain when mousePressEvent happens.
How to?
Cheers
JIA