theamrzaki
2nd April 2016, 23:55
I'm new to Qt. How can I capture click events/signals of a QGraphicsSvgItem inside a QGraphicsScene? I have the following code:
QGraphicsScene *scene = new QGraphicsScene(this);
QGraphicsSvgItem *svgItem = new QGraphicsSvgItem(":/SomeGraphic.svg");
svgItem->scale(0.1, 0.1);
svgItem->setPos(-200,-200);
scene->addItem(svgItem);
Is it possible to connect() the click() signal of svgItem to a slot?
QGraphicsScene *scene = new QGraphicsScene(this);
QGraphicsSvgItem *svgItem = new QGraphicsSvgItem(":/SomeGraphic.svg");
svgItem->scale(0.1, 0.1);
svgItem->setPos(-200,-200);
scene->addItem(svgItem);
Is it possible to connect() the click() signal of svgItem to a slot?