C++ (Qt)QColor fillColor = (down || !enabled) ? opt->palette.button().color() : opt->palette.base().color(); p->setBrush(fillColor);
C++ (Qt)QPalette palette = radioButton->palette();palette.setColor( QPalette::Base, Qt::blue );radioButton->setPalette( palette );
C++ (Qt)QRadioButton *btn = 0; for (int i = 0; i < m_colors.size(); ++i) { btn = new QRadioButton(m_colors.at(i), m_buttons); QPalette pal = btn->palette(); pal.setColor(QPalette::Base, Qt::red); pal.setColor(QPalette::Text, Qt::yellow); btn->setPalette(pal); vbox->addWidget(btn); }