Hello, everyone.
I'm new to Qt-programming and have the following problem:
Code:
{ layout->addWidget( area ); w->resize( 500, 500 ); area->setWidget( w ); area->viewport()->setAutoFillBackground( true ); // area->viewport()->setStyleSheet( "QWidget{background:green}" ); area->viewport()->setPalette( p ); this->setLayout( layout ); }
If I uncomment the line with setStyleSheet, the widget is wonderful red. But using the QPalette won't give a result.
What is thing, I do not understand?
I'm new here, so I hope I respect the rules of the forum.
Thank you.