设置主+子widget背景颜色
this.palette().setColor(QPalette::Window, QColor("red");
son_widget.setParent(this);
son_widget.palette().setColor(QPalette::Window,
QColor("black");
虽然,你输出: son_widget.palette().window().color()
他确实的 black
但是,son_widget的颜色 就是red。
解决办法是: son_widget..setAutoFillBackgro