看下面的说明 你就得到答案来了
flat : bool
This property holds whether the button border is raised.
This property's default is false. If this property is set, most styles will not paint the button background unless the button is being pressed. setAutoFillBackground() can be used to ensure that the background is filled using the QPalette::Button brush.