equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
268 protected: |
268 protected: |
269 void paint(QPainter *painter, |
269 void paint(QPainter *painter, |
270 const QStyleOptionViewItem &option, |
270 const QStyleOptionViewItem &option, |
271 const QModelIndex &index) const { |
271 const QModelIndex &index) const { |
272 QStyleOptionMenuItem opt = getStyleOption(option, index); |
272 QStyleOptionMenuItem opt = getStyleOption(option, index); |
|
273 #ifndef Q_WS_S60 |
273 painter->fillRect(option.rect, opt.palette.background()); |
274 painter->fillRect(option.rect, opt.palette.background()); |
|
275 #endif |
274 mCombo->style()->drawControl(QStyle::CE_MenuItem, &opt, painter, mCombo); |
276 mCombo->style()->drawControl(QStyle::CE_MenuItem, &opt, painter, mCombo); |
275 } |
277 } |
276 QSize sizeHint(const QStyleOptionViewItem &option, |
278 QSize sizeHint(const QStyleOptionViewItem &option, |
277 const QModelIndex &index) const { |
279 const QModelIndex &index) const { |
278 QStyleOptionMenuItem opt = getStyleOption(option, index); |
280 QStyleOptionMenuItem opt = getStyleOption(option, index); |