View Single Post
Old 01-01-2022, 01:48 PM   #22
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
I think this may be similar to my post #20. This code for a general utility class used as part of creating a read-only table widget:
Code:
from qt.core import QTableWidgetItem
class ReadOnlyTableWidgetItem(QTableWidgetItem):
    def __init__(self, text): 
        if text is None:
            text = ''
        QTableWidgetItem.__init__(self, text, QTableWidgetItem.UserType)
        self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled)
gives error
Code:
AttributeError: type object 'QTableWidgetItem' has no attribute 'UserType'
in v5.99

Last edited by jackie_w; 01-01-2022 at 01:51 PM.
jackie_w is offline   Reply With Quote