示例#1
0
 def update_editor ( self ):
     """ Updates the editor when the object trait changes externally to the
         editor.
     """
     if self.factory.image is None:
         value = self.value
         if isinstance( value, ImageResource ):
             self.control.setPixmap( convert_bitmap( value ) )
示例#2
0
    def init ( self, parent ):
        """ Finishes initializing the editor by creating the underlying toolkit
            widget.
        """
        image = self.factory.image
        if image is None:
            image = self.value

        self.control = QtGui.QLabel()
        self.control.setPixmap( convert_bitmap( image ) )

        self.set_tooltip()