def METHOD_NAME(self, isFloating):
    if isFloating:
        self.setStyleSheet(
            "QDockWidget { background-color:rgb(255,255,255); }")
    else:
        self.setStyleSheet(
            "QDockWidget { background-color:rgb(204,204,248); }")