m_rubberBand = new QRubberBand(QRubberBand::Rectangle,this);
QPalette palette=m_rubberBand->palette();
palette.setColor(m_rubberBand->backgroundRole(), Qt::red);
palette.setColor(m_rubberBand->foregroundRole(), Qt::red);
m_rubberBand->setPalette(palette);
设置了不起效,windows下还是默认白色的