a QGraphicsItem is not a QObject. So no way to define and connect slots
You have to write your own item derived both from QObject and QGraphicsItem.
Note that QObject must be the first derived object, in order to let the macro Q_OBJECT work well.
Qt Code:
Q_OBJECT //then you can define slots ready to be connected public slots: void mySlot(); };To copy to clipboard, switch view to plain text mode




Reply With Quote
Bookmarks