Would you please add a visibilityChanged(bool); signal to QCPLayerable class??. It is very useful for catching graph's visibility changes and show/hide associated objects to it (like AxisTag), with a simple line of code:

/* Catch visibility changes */
connect(graph, &QCPGraph::visibilityChanged, tag, &AxisTag::setVisible);

Here are the lines that need to be changed:

qcustomplot.h:755: Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibilityChanged)
+qcustomplot.h:786: void visibilityChanged(bool on);

+qcustomplot.cpp:1400: emit visibilityChanged(on);