View Full Version : QScrollArea transparent
bunjee
22nd June 2008, 18:20
I want my QScrollArea background to be transparent.
Any ideas?
bunjee
22nd June 2008, 21:13
I've subclassed QScrollArea adding the following statement.
QPalette p(viewport()->palette());
p.setBrush(QPalette::Window, Qt::NoBrush);
viewport()->setPalette(p);
Unfortunately it kills the performances.
Is there a Faster way ?
Mr Arnaud.
bunjee
23rd June 2008, 10:54
I guess I'm going to code my own optimized QScrollArea....
fanat9
23rd June 2008, 13:55
Didn't notice any performance problem:
...
QPalette palette = this->palette();
palette.setColor(QPalette::Window, QColor::fromRgb(255,255,255,0));
QScrollArea *negativeArea = new QScrollArea(dockNegativePanel);
componentNegative = new ComponentPanel("Negative", negativeArea);
negativeArea->setWidget(componentNegative);
negativeArea->setPalette(palette);
negativeArea->setBackgroundRole(QPalette::Window);
...
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.