How to hide grid and show only zeroline in QCustomPlot?

Solution 1:

Set Qt::NoPen to QCPGrid::setPen/setSubGridPen, but not setZeroLinePen.