I am using the QGis libraries in a external Qt App. When adding vector and raster layers (in any order) to the QgsMapLayerRegistry instance, it somehow sorts the layers so that the vector layers is first in the QgsMapLayerRegistry.mMapLayers list and then the raster layers. Which make perfectly sense otherwise at render time you wont see the vector layers if the order was the other way round.
But when adding a vector point layer with a memory data provider, i would like the layer to be first in the list, or at least "sorted" with the other vector layers. But is always end up last in the QgsMapLayerRegistry.mMapLayers list, and at render time it always gets rendered "beneath" the raster layer, how can i add the vector point layer with the memory data model, to be rendered "on top" of all other layers?