[Qt-interest] selection problem in listview
Ramesh
ramesh.bs at robosoftin.com
Wed Mar 3 11:41:00 CET 2010
If I set the color as mentioned by you I am getting the error
function call '[const QPalette].setColor(QPalette::ColorRole, {lval} const
QColor)' does not match
'QPalette::setColor(QPalette::ColorGroup, QPalette::ColorRole, const QColor
&)' (non-static)
'QPalette::setColor(QPalette::ColorRole, const QColor &)' (non-static)
I am not getting wats wrong with the symbian QT setcolor..
I have done like this
const QColor acolor = QColor::fromRgb(255,255,255);
option.palette.setColor(QPalette::Text,acolor);
pls suggest if I am wrong some were
From: Yevgen Yashchenko [mailto:lester.dev at gmail.com]
Sent: Tuesday, March 02, 2010 9:55 PM
To: Ramesh
Subject: Re: [Qt-interest] selection problem in listview
Sry, I didn't get what exactly have you been doing with my code. Did it
work?
This is the sample method
void YourDelegate::paint ( QPainter * painter, const QStyleOptionViewItem &
option, const QModelIndex & index ) const
{
if (!index.isValid()) return;
if (option.state & QStyle::State_Selected)
option.palette.setColor(QPalette::Text, Qt::White);
QStyledItemDelegate::paint(painter, option, index);
}
Hope this makes it clearer
2010/3/2 Ramesh <ramesh.bs at robosoftin.com>
Hey.. I hv passed the sample code..
pls hv look n tell me..
I am not getting the exact way to set the pallet colour to draw J
-----------------------------------------------
Robosoft Technologies - Come home to Technology
Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100303/b9314534/attachment.html
More information about the Qt-interest-old
mailing list