View Full Version : changing the background for a tablewidget
qtlinuxnewbie
25th February 2010, 04:15
hi,
can anyone guide me , in changing the background color for a required entire row in a table widget?
Thanks in advance
@qtlinuxnewbie
navi1084
25th February 2010, 04:38
Each Item is an instance of QTableWidgetItem. Hence you can apply the color for instance of QTableWidgetItem using void setBackground ( const QBrush & brush ). and set this item to appropriate column.
wagmare
25th February 2010, 06:25
best to look at this example
http://qt.nokia.com/doc/4.5/itemviews-frozencolumn.html
qtlinuxnewbie
25th February 2010, 08:42
@QTableWidgetItem *ValueItem;
ValueItem->setBackgroundColor(QColor(Qt::red));
hope this helps for any one.
@qtlinuxnewbie.
prof.ebral
27th February 2010, 05:02
Learn about Style Sheets: http://doc.trolltech.com/4.6/stylesheet.html
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.