View Full Version : QListView & backgroundBrush -> Houston we hv a problem
travis
29th July 2006, 07:15
I am using QListView ( in IconMode ... QT 4.2 ). I need to have a QPixmap tiled over QListView Background ... some thing similar to what QGraphicsView's setBackgroundBrush() achieves ... can some one guide me plz ...
Thanx
munna
29th July 2006, 09:04
If I have understood you correclty, then the following code should work.
QPalette pal;
pal.setBrush(QPalette::Window,QBrush(yourPixmapHer e));
listView->viewport()->setPalette(pal);
I have not tested this one, so please let me know if this works or not.
wysota
29th July 2006, 11:02
For QListView it could be QPalette::Base and not QPalette::Window.
travis
31st July 2006, 08:13
it worked like a charm ... on the first short i.e ... thanx a lot ... u saved me a lot of hassle ... else i would be using QGraphicsView in conjunction with Scene ... Btw i used QPalette::Base and it worked .... QPalette::Window doesnt .... Thanx for the help ...
http://ankur.wordpress.com
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.