I'd like to do something like this, even though I understand this is not how it works. I'm not really good with QMouseEvent,
void MainWindow::on_addState_triggered(QMouseEvent* event)
{
qDebug() << event->pos();
if (event->buttons() == Qt::LeftButton)
{
newBoard.drawState(event->x(),event->y());
}
}
So I want to click on the button addState in my interface (made with the Designer Mode, ui file) then on the second click on my scene it calls drawState() with the mouse (on click) position.
How I'm I supposed to do this ?
Right now the code compile but while running I get this error
QMetaObject::connectSlotsByName: No matching signal for on_addState_triggered(QMouseEvent*)