#define EDITCOLOR QColor(200,200,100)
ComboBoxSC
::ComboBoxSC(QWidget *parent,
const char *name
){
comboBox1
= new QComboBox( this,
"comboBox1" );
comboBoxFrameLayout
= new QHBoxLayout( this,
0,
0,
"comboBoxFrameLayout");
comboBoxFrameLayout->addWidget( comboBox1 );
comboBoxFrameLayout->addItem( spacerFixed );
setFocusPolicy
(QWidget::WheelFocus);
setFocusProxy(comboBox1);
// I've tried a hundred variations on these 2 lines
comboBox1->setPaletteBackgroundColor( EDITCOLOR);
setBackgroundMode( parentWidget()->backgroundMode() );
}
#define EDITCOLOR QColor(200,200,100)
ComboBoxSC::ComboBoxSC(QWidget *parent, const char *name)
: QWidget(parent, name)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
comboBox1 = new QComboBox( this, "comboBox1" );
comboBox1->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
comboBoxFrameLayout = new QHBoxLayout( this, 0, 0, "comboBoxFrameLayout");
comboBoxFrameLayout->addWidget( comboBox1 );
spacerFixed = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Fixed );
comboBoxFrameLayout->addItem( spacerFixed );
setFocusPolicy(QWidget::WheelFocus);
setFocusProxy(comboBox1);
// I've tried a hundred variations on these 2 lines
comboBox1->setPaletteBackgroundColor( EDITCOLOR);
setBackgroundMode( parentWidget()->backgroundMode() );
}
To copy to clipboard, switch view to plain text mode
I can't seem to do 3 things:
Bookmarks