If I set the horizontalHeaderVisible or verticalHeaderVisible attribute to false in Qt Designer, this works fine. But how can I enable / disable headers in my code? I've been trying something like this:
self.ui.tblContents.horizontalHeaderVisible = False
You'd get the header and .hide()
(or .setVisible(False)
:
self.ui.tblContents.horizontalHeader().hide()
# or
# self.ui.tblContents.horizontalHeader().setVisible(False)
self.ui.tblContents.verticalHeader().hide()
# or
# self.ui.tblContents.verticalHeader().setVisible(False)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With