T
T
TemaKam2021-08-27 21:28:45
PyQt
TemaKam, 2021-08-27 21:28:45

How to set text alignment to center for entire QTableView?

I can't find any simple way to turn on the alignment of all text in the table in the center in one line,
is this possible?

this does not work

self.ui.tableView.horizontalHeader().setDefaultAlignment(PyQt5.QtCore.Qt.AlignVCenter | PyQt5.QtCore.Qt.AlignHCenter)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question