Esempio n. 1
0
    def __init__(self, parent):
        super().__init__(parent)
        qscrollarea = QScrollArea(self)
        qscrollarea.setWidget(ScrollableThresholdsWidget(self))
        qscrollarea.setWidgetResizable(True)

        clear_results_button = PushButton("Reset To Defaults")
        clear_results_button.clicked.connect(self.reset_to_defaults)
        clear_results_button.setMinimumHeight(27)
        clear_results_button.setMinimumWidth(110)

        layout = QVBoxLayout()
        layout.addWidget(qscrollarea)
        layout.addWidget(clear_results_button, alignment=Qt.AlignLeft)
        self.setLayout(layout)
Esempio n. 2
0
    def __init__(self):
        super().__init__()

        self.qscrollarea = QScrollArea(self)
        self.results = ResultsFrame()
        self.qscrollarea.setWidget(self.results)
        self.qscrollarea.setWidgetResizable(True)

        clear_results_button = PushButton("Clear Results")
        clear_results_button.clicked.connect(self.clear_results)
        clear_results_button.setMinimumHeight(27)
        clear_results_button.setMinimumWidth(110)

        layout = QGridLayout()
        layout.addWidget(self.qscrollarea, 0, 0, 1, 2)
        layout.addWidget(clear_results_button,
                         1,
                         0,
                         1,
                         1,
                         alignment=Qt.AlignLeft)

        self.setLayout(layout)