The iOS version should not matter in this case (with respect to how this is 
implemented in Qt). But since you try to get the view, you are mixing Qt with 
native APIs. Do you call UIApplicationMain yourself? Perhaps you try to grab 
the view at a point before the window is fully created? You can check if 
reinterpret_cast<UIView *>(window()->winId()) returns the view. Otherwise you 
must be doing something very strange...

-Richard
________________________________________
Fra: interest-bounces+richard.gustavsen=digia....@qt-project.org 
[interest-bounces+richard.gustavsen=digia....@qt-project.org] p&#229; vegne av 
Nils Heidorn [nils_heid...@gmx.de]
Sendt: 25. september 2014 09:43
Til: interest@qt-project.org
Emne: [Interest] iOS8: Qt 5.3.2 / QML , cannot get UIView from QQuickWindow 
anymore

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


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to