tags:

views:

75

answers:

1

Hi, how can I connect a clicked() signal to a widget which doesn't seem to handle it (like QGraphicsView). If I try to rely on autoconnect, I get only: QMetaObject::connectSlotsByName: No matching signal for on_xxx_clicked()

What's the solution for situations like that?

Thanks

+2  A: 

I think you can reimplement mousePressEvent and mouseReleaseEvent that are inherited from QAbstractScrollArea.

omrib
Not only that, but if you really need a signal for those events (to connect elsewhere), you can create a signal in your derived class and emit that signal in the mouseReleaseEvent function.
Caleb Huitt - cjhuitt