I'm not sure whether that this fact documented or not, at least I haven't found info about the rules of the name of the widget, that was promoted to QCustomPlot. First I used the name layerGraph and everything worked OK, until I decided to connect to signal of clicking the axes.
I got error: QObject::connect: No such signal QWidget::axisDoubleClick(QCPAxis*, QCPAxis::SelectablePart, QMouseEvent*).
When I looked into example interactions, I noticed that all the syntax was absolutely the same, except for the name of the widget, which is called customPlot.
After I changed the name of my widget from layerGraph to customPlot, error message disappeared everything worked ok.
When I need several instances of QCustomPlot, I use names customPlot1, and so on.