Solved Transparent background: QChartView
-
I would like to create a QChartView with transparent background, I mean, no white default background.
I tryed:
legendView->setWindowFlags(Qt::FramelessWindowHint); legendView->setAttribute(Qt::WA_NoSystemBackground); legendView->setAttribute(Qt::WA_TranslucentBackground, true); legendView->setAttribute(Qt::WA_TransparentForMouseEvents); legendView->setWindowOpacity(0.5);
and
chart->setContentsMargins(0, 0, 0, 0); chart->setBackgroundRoundness(0);
But I got always the same white background.
How can I do this?
-
Hi,
Try usingQChart::setBackgroundVisible
:chart->setBackgroundVisible(false);
-
Hi,
Try usingQChart::setBackgroundVisible
:chart->setBackgroundVisible(false);
-
@SamurayH Thank you so much! I'm looking for this line for hours in the Qt documentation...