hello guys
I was make custom frame and I have to decorate them using stylesheet.
my custom frame has title bar and main widget.
and I hope paint to blue only title bar not main widget.
but is not working...........

first, my custom frame is organized like this :
Qt Code:
  1. Frame::Frame()
  2. {
  3. m_titleBar = new TitleBar(this);
  4. m_content = new QWidget(this);
  5.  
  6. QVBoxLayout *vbox = new QVBoxLayout(this);
  7. vbox->addWidget(m_titleBar);
  8.  
  9. QVBoxLayout *layout = new QVBoxLayout(this);
  10. layout->addWidget(m_content);
  11.  
  12. vbox->addLayout(layout);
  13. }
  14.  
  15. TitleBar::TitleBar(QWidget* parent)
  16. : QWidget(parent)
  17. {
  18. QLabel *label = new QLabel(this);
  19. label->setText("mylabel");
  20.  
  21. QHBoxLayout *hbox = new QHBoxLayout(this);
  22.  
  23. hbox->addWidget(label);
  24. }
To copy to clipboard, switch view to plain text mode 

and I was try some method this :
Qt Code:
  1. titlebar->setobjectname("titlebar");
  2. customframe->setstylesheet(tr("QWidget#titlebar{background : red;}"));
To copy to clipboard, switch view to plain text mode 

and this :
Qt Code:
  1. titlebar->setstylesheet(tr("QWidget{background : red;"}))
To copy to clipboard, switch view to plain text mode 

It's so hard... please help me ...