I have defined a QLineEdit in the "BaseForm" constructor as
Qt Code:
  1. boxLayout = new QVBoxLayout ( frameD );
  2. inputStripLayout = new QHBoxLayout ( );
  3. boxLayout->addLayout ( inputStripLayout );
  4.  
  5. lbCategory = new QLabel("Category #");
  6. lbCategory->setFont ( fb );
  7. inputStripLayout->addWidget ( lbCategory );
  8.  
  9. leCategoryNumber= new QLineEdit();
  10. leCategoryNumber->setAlignment ( Qt::AlignCenter );
  11. leCategoryNumber->setPalette ( palE );
  12. leCategoryNumber->setFont ( fb );
  13. leCategoryNumber->setMaximumWidth(30);
  14. leCategoryNumber->setEnabled(false);
  15.  
  16. inputStripLayout->addWidget ( leCategoryNumber)
To copy to clipboard, switch view to plain text mode 
and I want to change the color of the QLineEdit and set the focus with
Qt Code:
  1. void BaseForm::slotPb1()
  2. {
  3. catNum->inputCatNum();
  4. Pb1->setText("-");
  5. Pb2->setText("Cat'ory");
  6. leCategoryNumber->setPalette ( QColor (17, 255, 255) );
  7. leCategoryNumber->setEnabled(true);
  8. leCategoryNumber->setFocus();
To copy to clipboard, switch view to plain text mode 
I get the "focus" ok, but I get a "white" box, not the "blue" one I want. Looked at the QPalette" documentation and don't understand a word of it. I am sure there is a simple way to togle colors on a QLineEdit" as a signal for "User" input. But I couldn't find it .
Thanks in advance for you help.