Adjust indents in QTableWidget cells and header items
问题 I would like to align texts in a QTableWidget on the left side, but I would also like to add an indent so the text isn't stuck against the border. On the image, col_2 is what I want. And I would like the same for the header labels. from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QTableWidgetItem class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(400, 300) self.gridLayout = QtWidgets.QGridLayout(Form) self.gridLayout.setObjectName(