From 07daf28418a4f748601f157c682fc64c1ff4b113 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sat, 20 Aug 2011 17:38:50 +1000 Subject: [PATCH] ScrollArea Palette & AutoFillBackground test --- daily.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/daily.cpp b/daily.cpp index 64a84b5b..96c0e31a 100644 --- a/daily.cpp +++ b/daily.cpp @@ -8,6 +8,7 @@ #include "ui_daily.h" #include +#include #include #include #include @@ -77,12 +78,16 @@ Daily::Daily(QWidget *parent,QGLWidget * shared, MainWindow *mw) scrollArea=new MyScrollArea(ui->graphMainArea,this); + QPalette p; + p.setColor(QPalette::Window,Qt::white); + scrollArea->setPalette(p); + scrollArea->setBackgroundRole(QPalette::Window); ui->graphLayout->addWidget(scrollArea,1); ui->graphLayout->setSpacing(0); ui->graphLayout->setMargin(0); ui->graphLayout->setContentsMargins(0,0,0,0); scrollArea->setWidgetResizable(true); - scrollArea->setAutoFillBackground(false); + scrollArea->setAutoFillBackground(true); GraphLayout=new QWidget(scrollArea); GraphLayout->setAutoFillBackground(false);