[Interest] iOS8: Qt 5.3.2 / QML , cannot get UIView from QQuickWindow anymore

Nils Heidorn nils_heidorn at gmx.de
Thu Sep 25 09:43:50 CEST 2014


Hi !

I got a problem since upgrading my iPad to iOS 8 (had to, customer wants 
me to continue developing on iOS8 NOW).

On iOS 7.x i was used to get the current uiview like this:

UIView *view = static_cast<UIView 
*>(QGuiApplication::platformNativeInterface()->nativeResourceForWindow("uiview", 
window()));


or if i want to have it “ARC safe”:

UIView *view = (__bridge UIView *)reinterpret_cast<void 
*>(QGuiApplication::platformNativeInterface()->nativeResourceForWindow("uiview", 
window()));


But on iOS8 this results in “view = nil” :-(

I need the uiview in order to get the UIViewController (as most will):

UIViewController *qtController = [[view window] rootViewController];


Sooo, do you know a way to get the uiview (or better the 
UIViewController) on iOS 8 ?

Greetings,

Nils





More information about the Interest mailing list