コード例 #1
0
    def __init__(self, data, editable=False):
        # if not editable just initialise the ItemWidget as string
        if isinstance(data, V3D):
            self.is_v3d = True
        else:
            self.is_v3d = False

        if not editable:
            QTableWidgetItem.__init__(self, str(data))
            self.setFlags(self.flags() & ~Qt.ItemIsEditable)
            return

        QTableWidgetItem.__init__(self)

        if isinstance(data, V3D):
            data = str(data)

        self.display_data = data
        # this will correctly turn all number cells into number types
        self.reset()
コード例 #2
0
    def __init__(self, data, editable=False):
        # if not editable just initialise the ItemWidget as string
        if isinstance(data, V3D):
            self.is_v3d = True
        else:
            self.is_v3d = False

        if not editable:
            QTableWidgetItem.__init__(self, str(data))
            self.setFlags(self.flags() & ~Qt.ItemIsEditable)
            return

        QTableWidgetItem.__init__(self)

        if isinstance(data, V3D):
            data = str(data)

        self.display_data = data
        # this will correctly turn all number cells into number types
        self.reset()
コード例 #3
0
    def __init__(self, val=u'', style=None):

        QTableWidgetItem.__init__(self, safe_decode(val))
        self._style = style
        self.update_style()
コード例 #4
0
ファイル: _qcell.py プロジェクト: smathot/python-qdatamatrix
	def __init__(self, val=u'', style=None):

		QTableWidgetItem.__init__(self, safe_decode(val))
		self._style = style
		self.update_style()