def test_progressbar(): bar = widgets.ProgressBar() bar.set_alignment("left") bar.set_alignment("right") with pytest.raises(ValueError): bar.set_alignment("test") # assert bar.get_alignment() == "left" bar.set_text_direction("top_to_bottom") with pytest.raises(ValueError): bar.set_text_direction("test") bar.set_range(0, 20)
def __init__(self, parent=None): super().__init__(parent) progress_bar = widgets.ProgressBar() progress_bar.setRange(0, 0) progress_bar.setTextVisible(False) self.setBar(progress_bar) self.set_icon("mdi.timer-sand-empty") self.setWindowModality(QtCore.Qt.ApplicationModal) self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.Window) self.set_titlebar_buttons() self.setCancelButton(None) self.cancel()
def __init__(self, parent: QtWidgets.QWidget | None = None): super().__init__(parent=parent) progress_bar = widgets.ProgressBar() progress_bar.setRange(0, 0) progress_bar.setTextVisible(False) self.setBar(progress_bar) self.set_icon("mdi.timer-sand-empty") self.set_modality("application") self.set_flags(minimize=False, maximize=False, close=False, stay_on_top=True, window=True) self.setCancelButton(None) # type: ignore self.cancel()
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.progress_bar = widgets.ProgressBar()
def test_progressbar(): widgets.ProgressBar()
def test_progressbar(): widget = widgets.ProgressBar() widget.show()