Heat the oil in a heavy-based frying pan over a medium heat. Add the sliced onions and the sugar. Cook for about 20 minutes, stirring occasionally, until the onions are softened and caramelised. Set aside to cool.
Butter the bread, remove the crusts and cut into squares.
Top half of the bread with the caramelised onions. Arrange the slices of cheese on top and sandwich with the remaining bread.