Hi, all:
I created a class "CqtImageView" which inherits from QGraphicsView, in which I overwrite mousePressEvent
{
...
...
}
class CqtImageView : public QGraphicsView
{
...
void mousePressEvent(QMouseEvent *event);
...
}
To copy to clipboard, switch view to plain text mode
One "CqtImageView" object is further created in the "Ui" of my main class,
{
...
Ui::mymainClass ui;
...
}
class CMyMain : public QMainWindow
{
...
Ui::mymainClass ui;
...
}
To copy to clipboard, switch view to plain text mode
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
Bookmarks