QCustomPlot Discussion and Comments

Can you place QCPItemText outside the plot area?Return to overview

I have tried to place a QCPItemText object outside the plot area (to add extra descriptive text to axis labels), but it is not visible. I can place the object so that its coordinates are outside the plot area with the text extending into the plot area. The part of the text that is inside the plot area is visible, but the part of the text that is in the axis area is not visible. I tried placing the text on a new top layer, but the same thing happens. (All backgrounds set to black, text color is white.)

That's because the default clipping is set to the axis rect. You can change this with the setClipToAxisRect method. This is also mentioned in the detailed QCPAbstractItem documentation.