Hello, I'm working on a project and I want to make a totally transparent background for my realtime graph.
https://imgur.com/a/fx4Jejq This is my current graph and i want to see clearly the map behind.
Do you know if it's possible to do that ?
This is my code to modify the aspect of the graph
customPlot->addGraph(); customPlot->graph(0)->setPen(QPen(QColor(255, 0, 0))); //customPlot->setAttribute(Qt::WA_OpaquePaintEvent, false); //customPlot->setBackground(Qt::GlobalColor::transparent); // Mise en place d'un couleur pour tracer les axes QPen axis_pen; axis_pen.setColor(QColor(255,0,0)); QSharedPointer<QCPAxisTickerTime> timeTicker(new QCPAxisTickerTime); timeTicker->setTimeFormat("%h:%m:%s"); customPlot->xAxis->setTicker(timeTicker); customPlot->xAxis->setBasePen(axis_pen); //On change la couleur de l'axe customPlot->xAxis->setTickLabelColor(QColor(255,0,0)); //On change la couleur des données customPlot->xAxis->grid()->setPen(axis_pen); //On change la couleur de l'axe customPlot->xAxis->grid()->setZeroLinePen(axis_pen); //customPlot->xAxis->setLabel("T I M E"); customPlot->axisRect()->setupFullAxesBox(); customPlot->yAxis->setLabel("C U R R E N T"); customPlot->yAxis->setLabelColor(QColor(255,0,0)); customPlot->yAxis->setRange(-10, 100); customPlot->yAxis->setBasePen(axis_pen); customPlot->yAxis->grid()->setPen(axis_pen); //On change la couleur de l'axe customPlot->yAxis->grid()->setZeroLinePen(axis_pen); customPlot->yAxis->setTickLabelColor(QColor(255,0,0)); customPlot->setBackground(QBrush(Qt::transparent)); //customPlot->axisRect()->setBackground(Qt::red);
Thanks !