def update_progress(self, pc):
        """
        Accepts progress as float in
        :param pc: float 0-1 of completion.
        :return:
        """
        current_n = int(pc * 10)
        for n in range(1, 11):
            getattr(self, "progress_%d" % n).setStyleSheet(PROGRESS_ON if n > current_n else PROGRESS_OFF)

        Accepts progress as float in
        :param pc: float 0-1 of completion.
        :return:
        
pyqt5/demos/unzip/main.py