2014-01-13 38 views
4

在隱藏網格的同時,在QCustomPlot中是否有任何顯示零點的方法?我試圖用以下行隱藏網格:如何隱藏網格並在QCustomPlot中僅顯示零點?

ui->customPlot->xAxis->grid()->setVisible(false); 
ui->customPlot->yAxis->grid()->setVisible(false); 

但是這也隱藏了zerolines。我需要保持可見的zerolines。

+0

它爲什麼被投票? – Adnan

回答

5

設置Qt::NoPenQCPGrid::setPen/setSubGridPen,但不是setZeroLinePen

0
Current->xAxis->grid()->setSubGridVisible(false); 
Current->yAxis->grid()->setSubGridVisible(false);