def get_widget_for_attr(traits_ui, attr_name):
    """ Return the Qt widget in the UI which displays the attribute specified.
    """
    x_editor = traits_ui.get_editors(attr_name)[0]
    qt_widget = x_editor.control
    return qt_widget