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.
down : bool
This property holds whether the button is pressed down.
If this property is true, the button is pressed down. The signals pressed() and clicked() are not emitted if you set this property to true. The default is false.
上面摘抄qt帮助 按钮离开事件失效应该跟Flat有关 重写了button的外观应该不会失效吧