Each of my QML files contains a Page, and each page has the PortraitLock orientation value set.
I have 2 problems:
1) When I call the in-app-purchase api the orientation lock is discarded
2) If I rotate the screen and navigate pages, then rotate back, then click buttons on the pages then eventually the app becomes "invisible". All of the onscreen elements are still interactive and work but the phones homescreen is visible. This bug seems to have only appeared since I added a splash screen to my app which is controlled from C++

Any ideas as to what is wrong? It seems to me that the problems come when I try to include C++ in my app, e.g. the in-app-purchase or the splash screen.