

def init(self, parent):
    ' Finishes initializing the editor by creating the underlying toolkit\n            widget.\n        '
    if self.factory.readonly:
        self.control = QtGui.QLineEdit(self.str_value)
        self.control.setReadOnly(True)
        self.set_tooltip()
    else:
        super(SimpleEditor, self).init(parent)
    pal = QtGui.QPalette(self.control.palette())
    pal.setColor(QtGui.QPalette.Base, self.ok_color)
    self.control.setPalette(pal)
    drop_event_filter = _DropEventFilter(self.control)
    pal.control.installEventFilter(drop_event_filter)
    self.control._qt4_editor = self

dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/drop_editor.py SimpleEditor.init/VarMisuse@117/175 `self`->`pal`