plot: Convert PlotView to derive from QAbstractScrollArea

This commit is contained in:
Mike Walters
2016-03-02 23:36:25 +00:00
parent fc019afb32
commit d5ebd4f2cf
4 changed files with 5 additions and 10 deletions

View File

@@ -33,7 +33,7 @@
PlotView::PlotView()
{
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
}
void PlotView::refreshSources()
@@ -117,7 +117,7 @@ void PlotView::paintEvent(QPaintEvent *event)
if (lastSample - firstSample <= 0) return;
QRect rect = QRect(0, 0, width(), height());
QPainter painter(this);
QPainter painter(viewport());
painter.fillRect(rect, Qt::black);