diff --git a/src/legend/qlegend.cpp b/src/legend/qlegend.cpp index a8c12f5..199409e 100644 --- a/src/legend/qlegend.cpp +++ b/src/legend/qlegend.cpp @@ -247,6 +247,8 @@ QPen QLegend::pen() const void QLegend::setFont(const QFont &font) { if (d_ptr->m_font != font) { + // Hide items to avoid flickering + d_ptr->items()->setVisible(false); d_ptr->m_font = font; foreach (QLegendMarker *marker, d_ptr->markers()) { marker->setFont(d_ptr->m_font);