Peel the onions and cut into half rings, fry lightly in a pan with a little butter. Let cool down.
Mix the flour, eggs, 200 g cheese and sour cream together in a bowl. Add the ham cubes and onions, season with a little salt and pepper and stir everything well.
Put the dough in a springform pan (26 cm, lined with baking paper, or a quiche form gutted and dusted with flour) and sprinkle with the remaining cheese. Bake in the oven preheated to 200 ° C for about 25 minutes.