Firstly, the parameter names do not form part of the signal or slot signature. This lead to the error message you got. You correct that like:
QObject::connect(ui
->widget1,
SIGNAL(pointAdded
(const QPointF &)), ui
->label1,
SLOT(printPointCoordinates
(QPointF)));
QObject::connect(ui->widget1, SIGNAL(pointAdded(const QPointF &)), ui->label1, SLOT(printPointCoordinates(QPointF)));
To copy to clipboard, switch view to plain text mode
Secondly, connecting the signal to a QLabel object that does not have a slot named printPointCoordinates() will not work. You have declared and defined the slot in the MainWindow class so the target of the connect should be an instance of that class.
Bookmarks