In a deep pan, melt the butter on medium heat.
Add onions and saute until the water has evaporated, for about 8-10 minutes.
Add sugar and heavy cream to the onions and cook for 8-10 minutes.
Turn heat off and stir in both cheeses and egg. Set aside to cool.
Preheat oven to 350 degrees.
Place onion mixture in a pre-greased 9-inch baking dish.
Place dough over the onion mixture and pinch edges so there is no overlapping.
Bake for 40-45 minutes or until crisp and golden.
Let the pie cool for 10 minutes before slicing and serving.