예제 #1
0
    def setup_ui(self):
        """create the UI widgets
        """
        self.vertical_layout = QtWidgets.QVBoxLayout(self)

        self.header_horizontal_layout = QtWidgets.QHBoxLayout()

        self.responsible_label = QtWidgets.QLabel(self)
        self.responsible_label.setText('Resource')
        self.responsible_label.setStyleSheet("""
            background-color: gray;
            font-weight: bold;
            color: white;
            padding: 0.5em;
        """)

        self.add_resource_button = QtWidgets.QPushButton(self)
        self.add_resource_button.setText('+')
        self.add_resource_button.setStyleSheet("""
            background-color: gray;
            color: white;
            padding: 0.5em;
        """)

        self.header_horizontal_layout.addWidget(self.responsible_label)
        self.header_horizontal_layout.addStretch(1)
        self.header_horizontal_layout.addWidget(self.add_resource_button)
        self.header_horizontal_layout.setStretch(0, 1)
        self.header_horizontal_layout.setStretch(1, 0)
        self.vertical_layout.addLayout(self.header_horizontal_layout)

        self.responsible_grid_layout = QtWidgets.QGridLayout()
        self.vertical_layout.addLayout(self.responsible_grid_layout)
예제 #2
0
    def setup_ui(self):
        """create the UI widgets
        """
        self.vertical_layout = QtWidgets.QVBoxLayout(self)

        self.header_horizontal_layout = QtWidgets.QHBoxLayout()

        self.responsible_label = QtWidgets.QLabel(self)
        self.responsible_label.setText('Responsible')
        self.responsible_label.setStyleSheet("""
            background-color: gray;
            color: white;
            font-weight: bold;
            padding: 0.5em;
        """)

        self.add_responsible_button = QtWidgets.QPushButton(self)
        self.add_responsible_button.setText('+')
        self.add_responsible_button.setStyleSheet("""
            background-color: gray;
            color: white;
            font-weight: bold;
            padding: 0.5em;
        """)

        self.header_horizontal_layout.addWidget(self.responsible_label)
        self.header_horizontal_layout.addStretch(1)
        self.header_horizontal_layout.addWidget(self.add_responsible_button)
        self.header_horizontal_layout.setStretch(0, 1)
        self.header_horizontal_layout.setStretch(1, 0)
        self.vertical_layout.addLayout(self.header_horizontal_layout)

        self.responsible_grid_layout = QtWidgets.QGridLayout()
        self.vertical_layout.addLayout(self.responsible_grid_layout)

        line = QtWidgets.QFrame(self)
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(line)

        horizontal_layout = QtWidgets.QHBoxLayout()
        self.vertical_layout.addLayout(horizontal_layout)

        review_set_label = QtWidgets.QLabel(self)
        review_set_label.setText('Review Set')
        horizontal_layout.addWidget(review_set_label)