Python PyQt5.QtCore.Qt 模块,DashDotLine() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用PyQt5.QtCore.Qt.DashDotLine()

项目:repo-checker    作者:1dot75cm    | 项目源码 | 文件源码
def setupTable(self):
        """?????"""
        self.tableWidget.setFocusPolicy(Qt.NoFocus)  # ???
        self.tableWidget.setGridStyle(Qt.DashDotLine)  # ???
        self.tableWidget.setWordWrap(True)
        self.tableWidget.setCornerButtonEnabled(True)
        self.tableWidget.horizontalHeader().setVisible(True)  # ????
        #self.tableWidget.horizontalHeader().setSortIndicatorShown(True)  # ?????
        self.tableWidget.horizontalHeader().setStretchLastSection(True)  # ??????

        self.tableWidget.setColumnCount(self.tableColumnCount)  # ??
        self.tableWidget.setRowCount(self.tableRowCount)  # ??

        # ??
        for i in range(self.tableRowCount):
            item = QTableWidgetItem("%s" % (i+1))
            self.tableWidget.setVerticalHeaderItem(i, item)  # ??

        # ??
        for i in range(self.tableColumnCount):
            item = QTableWidgetItem(self.tableHeaders[i])  # QIcon, str
            self.tableWidget.setHorizontalHeaderItem(i, item)  # ?????

        for i in [3, 4, 5]:
            self.tableWidget.resizeColumnToContents(i)  # ????????

        # ?????
        for i in range(self.tableRowCount):
            self.tableContents.append(Checker())
            for j in range(self.tableColumnCount):
                item = QTableWidgetItem()
                self.tableWidget.setItem(i, j, item)

        self.setBackgroundColor(self.bgColor)