@staticmethod
def sizeTreeEditor(c, editor):
    """Size a QLineEdit in a tree headline so scrolling occurs"""
    space = c.frame.tree.treeWidget.size().width()
    used = editor.geometry().x() + 4
    editor.resize(space - used, editor.size().height())
