Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, March 2008
QListView Header Color


Message 1 in thread

Hi , I am trying to change QListview header color.But its not
changing.canany one tell me what is wrong in my code?
here is the code

QPalette pal = _ListView->header()->palette();
   pal.setColor(QColorGroup::Button,QColor(255,0,0));
_ListView->header()->setPalette(pal);
-- 
 [ signature omitted ] 

Message 2 in thread

Paul Mautushi wrote:


	

	Hi , I am trying to change QListview header color.But its not
changing.can any one tell me what is wrong in my code?
	 ... 
	 

The header color is controlled by your data model.  Change the model so
the headerData function returns your desired background brush for the
Qt::BackgroundRole.
 
Rob